Struct deno_core::OpTable [−][src]
pub struct OpTable(_);
Expand description
Collection for storing registered ops. The special ‘get_op_catalog’
op with OpId 0
is automatically added when the OpTable is created.
Implementations
impl OpTable
[src]
impl OpTable
[src]pub fn register_op<F>(&mut self, name: &str, op_fn: F) -> OpId where
F: Fn(Rc<RefCell<OpState>>, OpPayload<'_, '_, '_>) -> Op + 'static,
[src]
F: Fn(Rc<RefCell<OpState>>, OpPayload<'_, '_, '_>) -> Op + 'static,
pub fn op_entries(state: Rc<RefCell<OpState>>) -> Vec<(String, OpId)>
[src]
pub fn route_op(
op_id: OpId,
state: Rc<RefCell<OpState>>,
payload: OpPayload<'_, '_, '_>
) -> Op
[src]
op_id: OpId,
state: Rc<RefCell<OpState>>,
payload: OpPayload<'_, '_, '_>
) -> Op