pub struct TickIndicatorCpt<CA, CM>{ /* private fields */ }Expand description
A component to display a colored indicator alternating colors based on the tick rate of the terminal.
Implementations§
Source§impl<CA, CM> TickIndicatorCpt<CA, CM>
impl<CA, CM> TickIndicatorCpt<CA, CM>
Sourcepub fn with_palette(palette: &EzPalette) -> Self
pub fn with_palette(palette: &EzPalette) -> Self
Create a new TickIndicatorCpt component with two styles derived from one [Palette].
Sourcepub fn with_palettes(palette_a: &EzPalette, palette_b: &EzPalette) -> Self
pub fn with_palettes(palette_a: &EzPalette, palette_b: &EzPalette) -> Self
Create a new TickIndicatorCpt component with two styles derived from two [Palette]s.
Trait Implementations§
Source§impl<CID, CA, CS, CM> Component<CID, CA, CS, CM> for TickIndicatorCpt<CA, CM>
impl<CID, CA, CS, CM> Component<CID, CA, CS, CM> for TickIndicatorCpt<CA, CM>
Source§fn on_event(
&mut self,
ev: EzEvent<CID, CM>,
_: &mut State<CS>,
) -> Vec<EzEvent<CID, CM>>
fn on_event( &mut self, ev: EzEvent<CID, CM>, _: &mut State<CS>, ) -> Vec<EzEvent<CID, CM>>
Method to implement to handle events.
The component will receive any event if it is focused; but only events it is subscribed to otherwise.
Source§fn init(&mut self, state: &mut State<CS>) -> Vec<EzEvent<CID, CM>>
fn init(&mut self, state: &mut State<CS>) -> Vec<EzEvent<CID, CM>>
Method called on first tick only.
Source§impl<CA, CM> Debug for TickIndicatorCpt<CA, CM>
impl<CA, CM> Debug for TickIndicatorCpt<CA, CM>
Source§impl<CA, CM> Default for TickIndicatorCpt<CA, CM>
impl<CA, CM> Default for TickIndicatorCpt<CA, CM>
Source§impl<CA, CM> MockComponent for TickIndicatorCpt<CA, CM>
impl<CA, CM> MockComponent for TickIndicatorCpt<CA, CM>
Auto Trait Implementations§
impl<CA, CM> Freeze for TickIndicatorCpt<CA, CM>
impl<CA, CM> RefUnwindSafe for TickIndicatorCpt<CA, CM>
impl<CA, CM> Send for TickIndicatorCpt<CA, CM>
impl<CA, CM> Sync for TickIndicatorCpt<CA, CM>
impl<CA, CM> Unpin for TickIndicatorCpt<CA, CM>
impl<CA, CM> UnsafeUnpin for TickIndicatorCpt<CA, CM>
impl<CA, CM> UnwindSafe for TickIndicatorCpt<CA, CM>
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