pub struct RefListState { /* private fields */ }Expand description
State for the ref list widget.
Implementations§
Source§impl RefListState
impl RefListState
Sourcepub fn selected_ref_name(&self) -> Option<&str>
pub fn selected_ref_name(&self) -> Option<&str>
Get the currently selected ref name, if a leaf is selected.
Sourcepub fn selected_ref(&self) -> Option<&VoidRef>
pub fn selected_ref(&self) -> Option<&VoidRef>
Get the selected ref if a leaf is selected.
Sourcepub fn select_next(&mut self, viewport_height: usize)
pub fn select_next(&mut self, viewport_height: usize)
Move selection down.
Sourcepub fn select_prev(&mut self)
pub fn select_prev(&mut self)
Move selection up.
Sourcepub fn toggle_selected(&mut self)
pub fn toggle_selected(&mut self)
Toggle expansion of selected category.
Sourcepub fn select_first(&mut self)
pub fn select_first(&mut self)
Jump to first node.
Sourcepub fn select_last(&mut self, viewport_height: usize)
pub fn select_last(&mut self, viewport_height: usize)
Jump to last node.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RefListState
impl RefUnwindSafe for RefListState
impl Send for RefListState
impl Sync for RefListState
impl Unpin for RefListState
impl UnsafeUnpin for RefListState
impl UnwindSafe for RefListState
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> 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