pub enum TreeStorage {
VertexOnly(HashMap<VertexId, SearchTreeNode>),
Stateful {
nodes: HashMap<Label, SearchTreeNode>,
labels: HashMap<VertexId, HashSet<Label>>,
},
}Variants§
VertexOnly(HashMap<VertexId, SearchTreeNode>)
Stateful
Implementations§
Source§impl TreeStorage
impl TreeStorage
pub fn new_vertex_oriented() -> Self
pub fn new_stateful() -> Self
pub fn insert_node( &mut self, label: Label, node: SearchTreeNode, ) -> Result<(), SearchTreeError>
pub fn contains_key(&self, label: &Label) -> bool
pub fn get(&self, label: &Label) -> Option<&SearchTreeNode>
pub fn get_mut(&mut self, label: &Label) -> Option<&mut SearchTreeNode>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get_labels( &self, vertex: VertexId, ) -> Box<dyn Iterator<Item = Label> + '_>
pub fn branch_iter<'a>( &'a self, ) -> Box<dyn Iterator<Item = (Label, &'a SearchTreeNode)> + 'a>
pub fn label_iter<'a>(&'a self) -> Box<dyn Iterator<Item = Label> + 'a>
pub fn node_iter<'a>( &'a self, ) -> Box<dyn Iterator<Item = &'a SearchTreeNode> + 'a>
Trait Implementations§
Source§impl Allocative for TreeStorage
impl Allocative for TreeStorage
Source§impl Clone for TreeStorage
impl Clone for TreeStorage
Source§fn clone(&self) -> TreeStorage
fn clone(&self) -> TreeStorage
Returns a duplicate 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 Freeze for TreeStorage
impl RefUnwindSafe for TreeStorage
impl Send for TreeStorage
impl Sync for TreeStorage
impl Unpin for TreeStorage
impl UnsafeUnpin for TreeStorage
impl UnwindSafe for TreeStorage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more