pub enum Tag<'a, C: TagConvertor<'a> + ?Sized> {
Fg(C::Color),
Bg(C::Color),
Modifier(C::Modifier),
Custom(C::Custom),
}
Expand description
Tag of a Element after tag conversion stage.
Fg/Bg/Modifier variant is so-called builtin tag, Custom variant contains custom tag type.
Variants§
Fg(C::Color)
Tag for change foreground color.
Bg(C::Color)
Tag for change background color.
Modifier(C::Modifier)
Tag for use style modifier.
Custom(C::Custom)
A custom tag.
Trait Implementations§
Source§impl<'a, C> From<Tag<'a, C>> for ContentStyle
Available on crate feature crossterm
only.
impl<'a, C> From<Tag<'a, C>> for ContentStyle
Available on crate feature
crossterm
only.Auto Trait Implementations§
impl<'a, C> Freeze for Tag<'a, C>where
<C as TagConvertor<'a>>::Color: Freeze,
<C as TagConvertor<'a>>::Modifier: Freeze,
<C as TagConvertor<'a>>::Custom: Freeze,
C: ?Sized,
impl<'a, C> RefUnwindSafe for Tag<'a, C>where
<C as TagConvertor<'a>>::Color: RefUnwindSafe,
<C as TagConvertor<'a>>::Modifier: RefUnwindSafe,
<C as TagConvertor<'a>>::Custom: RefUnwindSafe,
C: ?Sized,
impl<'a, C> Send for Tag<'a, C>where
<C as TagConvertor<'a>>::Color: Send,
<C as TagConvertor<'a>>::Modifier: Send,
<C as TagConvertor<'a>>::Custom: Send,
C: ?Sized,
impl<'a, C> Sync for Tag<'a, C>where
<C as TagConvertor<'a>>::Color: Sync,
<C as TagConvertor<'a>>::Modifier: Sync,
<C as TagConvertor<'a>>::Custom: Sync,
C: ?Sized,
impl<'a, C> Unpin for Tag<'a, C>where
<C as TagConvertor<'a>>::Color: Unpin,
<C as TagConvertor<'a>>::Modifier: Unpin,
<C as TagConvertor<'a>>::Custom: Unpin,
C: ?Sized,
impl<'a, C> UnwindSafe for Tag<'a, C>where
<C as TagConvertor<'a>>::Color: UnwindSafe,
<C as TagConvertor<'a>>::Modifier: UnwindSafe,
<C as TagConvertor<'a>>::Custom: UnwindSafe,
C: ?Sized,
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