2019-08-14 11:03:02 -04:00
|
|
|
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
2019-08-26 08:50:21 -04:00
|
|
|
use super::dispatch_json::{JsonOp, Value};
|
2019-08-14 11:03:02 -04:00
|
|
|
use crate::resources::table_entries;
|
|
|
|
use crate::state::ThreadSafeState;
|
|
|
|
use deno::*;
|
|
|
|
|
|
|
|
pub fn op_resources(
|
|
|
|
_state: &ThreadSafeState,
|
2019-08-26 08:50:21 -04:00
|
|
|
_args: Value,
|
|
|
|
_zero_copy: Option<PinnedBuf>,
|
|
|
|
) -> Result<JsonOp, ErrBox> {
|
2019-08-14 11:03:02 -04:00
|
|
|
let serialized_resources = table_entries();
|
2019-08-26 08:50:21 -04:00
|
|
|
Ok(JsonOp::Sync(json!(serialized_resources)))
|
2019-08-14 11:03:02 -04:00
|
|
|
}
|