pub struct IndexTree { /* private fields */ }Expand description
Ownership and parent/child relations among the indexes of one root.
Implementations§
Source§impl IndexTree
impl IndexTree
pub fn new(root: &str, indexes: impl IntoIterator<Item = String>) -> Self
Sourcepub fn owner_of(&self, doc_path: &str) -> String
pub fn owner_of(&self, doc_path: &str) -> String
The index responsible for listing the document at doc_path.
Sourcepub fn parent_of(&self, index_path: &str) -> Option<String>
pub fn parent_of(&self, index_path: &str) -> Option<String>
The index that should link to index_path; None for the root index.
Sourcepub fn children_of(&self, index_path: &str) -> Vec<String>
pub fn children_of(&self, index_path: &str) -> Vec<String>
Indexes whose parent is index_path.
Auto Trait Implementations§
impl Freeze for IndexTree
impl RefUnwindSafe for IndexTree
impl Send for IndexTree
impl Sync for IndexTree
impl Unpin for IndexTree
impl UnsafeUnpin for IndexTree
impl UnwindSafe for IndexTree
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