pub enum TreeChildren<'a, Id> {
Leaf,
Unloaded,
Loading,
Loaded(&'a [Id]),
}Expand description
The state of a node’s child list.
Unlike an empty slice, Unloaded and Loading preserve the fact that a node is a branch
whose children may be loaded asynchronously.
Variants§
Leaf
The node is known to be a leaf.
Unloaded
Children exist or may exist, but have not been loaded yet.
Loading
Children are currently loading.
Loaded(&'a [Id])
Children are loaded and exposed as a stable slice.
Implementations§
Source§impl<'a, Id> TreeChildren<'a, Id>
impl<'a, Id> TreeChildren<'a, Id>
Trait Implementations§
Source§impl<'a, Id: Clone> Clone for TreeChildren<'a, Id>
impl<'a, Id: Clone> Clone for TreeChildren<'a, Id>
Source§fn clone(&self) -> TreeChildren<'a, Id>
fn clone(&self) -> TreeChildren<'a, Id>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a, Id: Copy> Copy for TreeChildren<'a, Id>
Source§impl<'a, Id: Debug> Debug for TreeChildren<'a, Id>
impl<'a, Id: Debug> Debug for TreeChildren<'a, Id>
impl<'a, Id: Eq> Eq for TreeChildren<'a, Id>
Source§impl<'a, Id: PartialEq> PartialEq for TreeChildren<'a, Id>
impl<'a, Id: PartialEq> PartialEq for TreeChildren<'a, Id>
impl<'a, Id: PartialEq> StructuralPartialEq for TreeChildren<'a, Id>
Auto Trait Implementations§
impl<'a, Id> Freeze for TreeChildren<'a, Id>
impl<'a, Id> RefUnwindSafe for TreeChildren<'a, Id>where
Id: RefUnwindSafe,
impl<'a, Id> Send for TreeChildren<'a, Id>where
Id: Sync,
impl<'a, Id> Sync for TreeChildren<'a, Id>where
Id: Sync,
impl<'a, Id> Unpin for TreeChildren<'a, Id>
impl<'a, Id> UnsafeUnpin for TreeChildren<'a, Id>
impl<'a, Id> UnwindSafe for TreeChildren<'a, Id>where
Id: RefUnwindSafe,
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<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