pub struct ChartStates {
pub cursor: usize,
pub data: Vec<ChartDataset>,
}Expand description
The state that needs to be kepts for the Chart component.
Fields§
§cursor: usize§data: Vec<ChartDataset>Implementations§
Source§impl ChartStates
impl ChartStates
Sourcepub fn move_cursor_left(&mut self)
pub fn move_cursor_left(&mut self)
Move cursor to the left.
Sourcepub fn move_cursor_right(&mut self, data_len: usize)
pub fn move_cursor_right(&mut self, data_len: usize)
Move cursor to the right.
Sourcepub fn reset_cursor(&mut self)
pub fn reset_cursor(&mut self)
Reset cursor to 0.
Sourcepub fn cursor_at_end(&mut self, data_len: usize)
pub fn cursor_at_end(&mut self, data_len: usize)
Move cursor to the end of the chart.
Trait Implementations§
Source§impl Default for ChartStates
impl Default for ChartStates
Source§fn default() -> ChartStates
fn default() -> ChartStates
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ChartStates
impl RefUnwindSafe for ChartStates
impl Send for ChartStates
impl Sync for ChartStates
impl Unpin for ChartStates
impl UnsafeUnpin for ChartStates
impl UnwindSafe for ChartStates
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