pub struct RepoPathTree<V> { /* private fields */ }Expand description
Tree that maps RepoPath to value of type V.
Implementations§
Source§impl<V> RepoPathTree<V>
impl<V> RepoPathTree<V>
Sourcepub fn value_mut(&mut self) -> &mut V
pub fn value_mut(&mut self) -> &mut V
Mutable reference to the value associated with this path.
Sourcepub fn children(&self) -> impl Iterator<Item = (&RepoPathComponent, &Self)>
pub fn children(&self) -> impl Iterator<Item = (&RepoPathComponent, &Self)>
The immediate children of this node.
Sourcepub fn has_children(&self) -> bool
pub fn has_children(&self) -> bool
Whether this node has any children.
Sourcepub fn add(&mut self, path: &RepoPath) -> &mut Selfwhere
V: Default,
pub fn add(&mut self, path: &RepoPath) -> &mut Selfwhere
V: Default,
Add a path to the tree. Normally called on the root tree.
Trait Implementations§
Source§impl<V: Clone> Clone for RepoPathTree<V>
impl<V: Clone> Clone for RepoPathTree<V>
Source§fn clone(&self) -> RepoPathTree<V>
fn clone(&self) -> RepoPathTree<V>
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 moreSource§impl<V: Debug> Debug for RepoPathTree<V>
impl<V: Debug> Debug for RepoPathTree<V>
Source§impl<V: Default> Default for RepoPathTree<V>
impl<V: Default> Default for RepoPathTree<V>
Source§fn default() -> RepoPathTree<V>
fn default() -> RepoPathTree<V>
Returns the “default value” for a type. Read more
Source§impl<V: PartialEq> PartialEq for RepoPathTree<V>
impl<V: PartialEq> PartialEq for RepoPathTree<V>
impl<V: Eq> Eq for RepoPathTree<V>
impl<V> StructuralPartialEq for RepoPathTree<V>
Auto Trait Implementations§
impl<V> Freeze for RepoPathTree<V>where
V: Freeze,
impl<V> RefUnwindSafe for RepoPathTree<V>where
V: RefUnwindSafe,
impl<V> Send for RepoPathTree<V>where
V: Send,
impl<V> Sync for RepoPathTree<V>where
V: Sync,
impl<V> Unpin for RepoPathTree<V>where
V: Unpin,
impl<V> UnwindSafe for RepoPathTree<V>where
V: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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