Struct loro_internal::handler::TreeHandler
source · pub struct TreeHandler { /* private fields */ }
Expand description
Implementations§
source§impl TreeHandler
impl TreeHandler
pub fn new( txn: Weak<Mutex<Option<Transaction>>>, idx: ContainerIdx, state: Weak<Mutex<DocState>> ) -> Self
pub fn delete(&self, target: TreeID) -> LoroResult<()>
pub fn delete_with_txn( &self, txn: &mut Transaction, target: TreeID ) -> LoroResult<()>
pub fn create<T: Into<Option<TreeID>>>(&self, parent: T) -> LoroResult<TreeID>
pub fn create_with_txn<T: Into<Option<TreeID>>>( &self, txn: &mut Transaction, parent: T ) -> LoroResult<TreeID>
pub fn mov<T: Into<Option<TreeID>>>( &self, target: TreeID, parent: T ) -> LoroResult<()>
pub fn mov_with_txn<T: Into<Option<TreeID>>>( &self, txn: &mut Transaction, target: TreeID, parent: T ) -> LoroResult<()>
pub fn get_meta(&self, target: TreeID) -> LoroResult<MapHandler>
pub fn parent(&self, target: TreeID) -> Option<Option<TreeID>>
pub fn id(&self) -> ContainerID
pub fn contains(&self, target: TreeID) -> bool
pub fn get_value(&self) -> LoroValue
pub fn get_deep_value(&self) -> LoroValue
pub fn nodes(&self) -> Vec<TreeID>
Trait Implementations§
source§impl Clone for TreeHandler
impl Clone for TreeHandler
source§fn clone(&self) -> TreeHandler
fn clone(&self) -> TreeHandler
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for TreeHandler
impl Send for TreeHandler
impl Sync for TreeHandler
impl Unpin for TreeHandler
impl UnwindSafe for TreeHandler
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more