pub trait HandlerTrait: Clone + Sized {
Show 13 methods // Required methods fn is_attached(&self) -> bool; fn attached_handler(&self) -> Option<&BasicHandler>; fn get_value(&self) -> LoroValue; fn get_deep_value(&self) -> LoroValue; fn kind(&self) -> ContainerType; fn to_handler(&self) -> Handler; fn from_handler(h: Handler) -> Option<Self>; fn attach( &self, txn: &mut Transaction, parent: &BasicHandler, self_id: ContainerID ) -> LoroResult<Self>; fn get_attached(&self) -> Option<Self>; // Provided methods fn parent(&self) -> Option<Handler> { ... } fn idx(&self) -> ContainerIdx { ... } fn id(&self) -> ContainerID { ... } fn with_state<R>( &self, f: impl FnOnce(&mut State) -> LoroResult<R> ) -> LoroResult<R> { ... }
}

Required Methods§

source

fn is_attached(&self) -> bool

source

fn attached_handler(&self) -> Option<&BasicHandler>

source

fn get_value(&self) -> LoroValue

source

fn get_deep_value(&self) -> LoroValue

source

fn kind(&self) -> ContainerType

source

fn to_handler(&self) -> Handler

source

fn from_handler(h: Handler) -> Option<Self>

source

fn attach( &self, txn: &mut Transaction, parent: &BasicHandler, self_id: ContainerID ) -> LoroResult<Self>

This method returns an attached handler.

source

fn get_attached(&self) -> Option<Self>

If a detached container is attached, this method will return its corresponding attached handler.

Provided Methods§

source

fn parent(&self) -> Option<Handler>

source

fn idx(&self) -> ContainerIdx

source

fn id(&self) -> ContainerID

source

fn with_state<R>( &self, f: impl FnOnce(&mut State) -> LoroResult<R> ) -> LoroResult<R>

Object Safety§

This trait is not object safe.

Implementors§