pub struct LegendMock { /* private fields */ }Expand description
A mock component to display a colored indicator inside the TUI. The indicator is a simple box alternating its style from a given set of Style when [Self::cycle] is called.
Implementations§
Source§impl LegendMock
impl LegendMock
Sourcepub fn with_hotkeys(legend: Legend) -> Self
pub fn with_hotkeys(legend: Legend) -> Self
Create a new LegendMock component by picking two colors from the given [Palette].
Trait Implementations§
Source§impl Debug for LegendMock
impl Debug for LegendMock
Source§impl Default for LegendMock
impl Default for LegendMock
Source§fn default() -> LegendMock
fn default() -> LegendMock
Returns the “default value” for a type. Read more
Source§impl MockComponent for LegendMock
impl MockComponent for LegendMock
Auto Trait Implementations§
impl Freeze for LegendMock
impl RefUnwindSafe for LegendMock
impl Send for LegendMock
impl Sync for LegendMock
impl Unpin for LegendMock
impl UnsafeUnpin for LegendMock
impl UnwindSafe for LegendMock
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