Skip to main content

ChildOperation

Trait ChildOperation 

Source
pub trait ChildOperation {
    // Required methods
    unsafe fn get_child_at(&self, idx: usize) -> Option<&Node>;
    unsafe fn get_child_ptr_at(&self, idx: usize) -> Option<NodePtr>;
    unsafe fn get_child_index(&self, child: NodePtr) -> Option<usize>;
    unsafe fn append_child(&self, child: NodePtr);
    unsafe fn insert_child_at(&self, child: NodePtr, idx: usize);
    unsafe fn insert_child_before(&self, child: NodePtr, pivot: NodePtr);
    unsafe fn remove_child(&self, child: NodePtr);
    unsafe fn remove_child_at(&self, idx: usize);
    unsafe fn remove_all_children(&self);
    unsafe fn for_each_child_node<'a, 'b: 'a, F>(&'b self, func: F)
       where F: FnMut(&'a Self, usize);
}

Required Methods§

Source

unsafe fn get_child_at(&self, idx: usize) -> Option<&Node>

Source

unsafe fn get_child_ptr_at(&self, idx: usize) -> Option<NodePtr>

Source

unsafe fn get_child_index(&self, child: NodePtr) -> Option<usize>

Source

unsafe fn append_child(&self, child: NodePtr)

Source

unsafe fn insert_child_at(&self, child: NodePtr, idx: usize)

Source

unsafe fn insert_child_before(&self, child: NodePtr, pivot: NodePtr)

Source

unsafe fn remove_child(&self, child: NodePtr)

Source

unsafe fn remove_child_at(&self, idx: usize)

Source

unsafe fn remove_all_children(&self)

Source

unsafe fn for_each_child_node<'a, 'b: 'a, F>(&'b self, func: F)
where F: FnMut(&'a Self, usize),

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§