Struct steam_tui::util::stateful::StatefulList
source · pub struct StatefulList<T> {
pub state: ListState,
pub items: Vec<T>,
pub query: String,
}
Fields§
§state: ListState
§items: Vec<T>
§query: String
Implementations§
source§impl<T: Named> StatefulList<T>
impl<T: Named> StatefulList<T>
pub fn new() -> StatefulList<T>
pub fn with_items(items: Vec<T>) -> StatefulList<T>
pub fn is_empty(&self) -> bool
pub fn selected(&self) -> Option<&T>
pub fn activated(&self) -> Vec<&T>
pub fn restart(&mut self)
pub fn next(&mut self)
pub fn previous(&mut self)
pub fn unselect(&mut self)
Trait Implementations§
source§impl<T: Clone> Clone for StatefulList<T>
impl<T: Clone> Clone for StatefulList<T>
source§fn clone(&self) -> StatefulList<T>
fn clone(&self) -> StatefulList<T>
Returns a copy 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 moreAuto Trait Implementations§
impl<T> Freeze for StatefulList<T>
impl<T> RefUnwindSafe for StatefulList<T>where
T: RefUnwindSafe,
impl<T> Send for StatefulList<T>where
T: Send,
impl<T> Sync for StatefulList<T>where
T: Sync,
impl<T> Unpin for StatefulList<T>where
T: Unpin,
impl<T> UnwindSafe for StatefulList<T>where
T: 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> 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 moresource§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.