pub struct KeywordTree { /* private fields */ }Expand description
Keyword tree
Operate as a hash multimap of parent -> Vec<child>
Implementations§
Source§impl KeywordTree
impl KeywordTree
pub fn new() -> KeywordTree
Sourcepub fn children_for(&self, id: i64) -> Vec<i64>
pub fn children_for(&self, id: i64) -> Vec<i64>
Get children for keyword with id
Sourcepub fn add_children(&mut self, children: &BTreeMap<i64, Keyword>)
pub fn add_children(&mut self, children: &BTreeMap<i64, Keyword>)
Add children to the tree node.
Trait Implementations§
Source§impl Default for KeywordTree
impl Default for KeywordTree
Source§fn default() -> KeywordTree
fn default() -> KeywordTree
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for KeywordTree
impl RefUnwindSafe for KeywordTree
impl Send for KeywordTree
impl Sync for KeywordTree
impl Unpin for KeywordTree
impl UnsafeUnpin for KeywordTree
impl UnwindSafe for KeywordTree
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