pub struct TreeState {
pub selected: usize,
/* private fields */
}Expand description
Selection + scroll state for a render_tree widget, over the slice of
currently-visible rows.
Fields§
§selected: usizeIndex of the selected row within the visible rows.
Implementations§
Source§impl TreeState
impl TreeState
pub fn new() -> Self
Sourcepub fn select_next(&mut self, row_count: usize)
pub fn select_next(&mut self, row_count: usize)
Move selection to the next visible row, wrapping at the end.
Sourcepub fn select_prev(&mut self, row_count: usize)
pub fn select_prev(&mut self, row_count: usize)
Move selection to the previous visible row, wrapping at the start.
pub fn selected(&self) -> usize
pub fn offset(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TreeState
impl RefUnwindSafe for TreeState
impl Send for TreeState
impl Sync for TreeState
impl Unpin for TreeState
impl UnsafeUnpin for TreeState
impl UnwindSafe for TreeState
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