pub struct State(pub Vec<Row>);Expand description
Contains the items and the layout of the TUI
Tuple Fields§
§0: Vec<Row>Implementations§
Source§impl State
impl State
Sourcepub fn selectables(&self) -> Vec<Vec<(usize, usize)>>
pub fn selectables(&self) -> Vec<Vec<(usize, usize)>>
Generate selectables which is a 2D vector of items that can be selected
(usize, usize) maps to the (x, y) position to State.0, items that are not selectable
are excluded
Sourcepub fn get(&self, x: usize, y: usize) -> &dyn FrameworkItem
pub fn get(&self, x: usize, y: usize) -> &dyn FrameworkItem
Get reference to item with x and y value
Trait Implementations§
Auto Trait Implementations§
impl Freeze for State
impl !RefUnwindSafe for State
impl !Send for State
impl !Sync for State
impl Unpin for State
impl !UnwindSafe for State
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<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