pub struct SmallTree<T> {
pub graph: SmallGraph<T>,
pub root: NodeHandle,
}
Fields§
§graph: SmallGraph<T>
§root: NodeHandle
Implementations§
Source§impl<T> SmallTree<T>
impl<T> SmallTree<T>
pub fn new(root: T) -> SmallTree<T>
pub fn attach(&mut self, parent: NodeHandle, child: T) -> NodeHandle
pub fn children(&self, parent: NodeHandle) -> SmallVec<[NodeHandle; 8]>
pub fn remove(&mut self, node: NodeHandle) -> Option<T>
pub fn get(&self, node: NodeHandle) -> Option<&T>
pub fn get_mut(&mut self, node: NodeHandle) -> Option<&mut T>
Auto Trait Implementations§
impl<T> Freeze for SmallTree<T>where
T: Freeze,
impl<T> RefUnwindSafe for SmallTree<T>where
T: RefUnwindSafe,
impl<T> Send for SmallTree<T>where
T: Send,
impl<T> Sync for SmallTree<T>where
T: Sync,
impl<T> Unpin for SmallTree<T>where
T: Unpin,
impl<T> UnwindSafe for SmallTree<T>where
T: RefUnwindSafe + UnwindSafe,
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