pub struct TreeProjection<Id> { /* private fields */ }Expand description
A cached flat projection shared by navigation and rendering.
Implementations§
Source§impl<Id: Copy + Eq + Hash> TreeProjection<Id>
impl<Id: Copy + Eq + Hash> TreeProjection<Id>
Sourcepub fn nodes(&self) -> &[ProjectedNode<Id>]
pub fn nodes(&self) -> &[ProjectedNode<Id>]
Returns rows in display order.
Sourcepub fn index_of(&self, id: Id) -> Option<usize>
pub fn index_of(&self, id: Id) -> Option<usize>
Возвращает индекс первого видимого вхождения узла.
Sourcepub fn get_by_id(&self, id: Id) -> Option<ProjectedNode<Id>>
pub fn get_by_id(&self, id: Id) -> Option<ProjectedNode<Id>>
Возвращает первое видимое вхождение узла по идентификатору.
Auto Trait Implementations§
impl<Id> Freeze for TreeProjection<Id>
impl<Id> RefUnwindSafe for TreeProjection<Id>where
Id: RefUnwindSafe,
impl<Id> Send for TreeProjection<Id>where
Id: Send,
impl<Id> Sync for TreeProjection<Id>where
Id: Sync,
impl<Id> Unpin for TreeProjection<Id>where
Id: Unpin,
impl<Id> UnsafeUnpin for TreeProjection<Id>
impl<Id> UnwindSafe for TreeProjection<Id>where
Id: 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> 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