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
sourceimpl OpTable
impl OpTable
pub fn register_op<F>(&mut self, name: &str, op_fn: F) -> OpId where
F: Fn(Rc<RefCell<OpState>>, OpPayload<'_, '_, '_>) -> Op + 'static,
pub fn op_entries(state: Rc<RefCell<OpState>>) -> Vec<(String, OpId)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn route_op(
op_id: OpId,
state: Rc<RefCell<OpState>>,
payload: OpPayload<'_, '_, '_>
) -> Op
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for OpTable
impl !Send for OpTable
impl !Sync for OpTable
impl Unpin for OpTable
impl !UnwindSafe for OpTable
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more