Struct ratatui::text::StyledGrapheme
source · pub struct StyledGrapheme<'a> {
pub symbol: &'a str,
pub style: Style,
}
Expand description
A grapheme associated to a style.
Note that, although StyledGrapheme
is the smallest divisible unit of text,
it actually is not a member of the text type hierarchy (Text
-> Line
-> Span
).
It is a separate type used mostly for rendering purposes. A Span
consists of components that
can be split into StyledGrapheme
s, but it does not contain a collection of StyledGrapheme
s.
Fields§
§symbol: &'a str
§style: Style
Implementations§
Trait Implementations§
source§impl<'a> Clone for StyledGrapheme<'a>
impl<'a> Clone for StyledGrapheme<'a>
source§fn clone(&self) -> StyledGrapheme<'a>
fn clone(&self) -> StyledGrapheme<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> Debug for StyledGrapheme<'a>
impl<'a> Debug for StyledGrapheme<'a>
source§impl<'a> Default for StyledGrapheme<'a>
impl<'a> Default for StyledGrapheme<'a>
source§fn default() -> StyledGrapheme<'a>
fn default() -> StyledGrapheme<'a>
Returns the “default value” for a type. Read more
source§impl<'a> Hash for StyledGrapheme<'a>
impl<'a> Hash for StyledGrapheme<'a>
source§impl<'a> PartialEq for StyledGrapheme<'a>
impl<'a> PartialEq for StyledGrapheme<'a>
source§fn eq(&self, other: &StyledGrapheme<'a>) -> bool
fn eq(&self, other: &StyledGrapheme<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> Styled for StyledGrapheme<'a>
impl<'a> Styled for StyledGrapheme<'a>
impl<'a> Eq for StyledGrapheme<'a>
impl<'a> StructuralPartialEq for StyledGrapheme<'a>
Auto Trait Implementations§
impl<'a> Freeze for StyledGrapheme<'a>
impl<'a> RefUnwindSafe for StyledGrapheme<'a>
impl<'a> Send for StyledGrapheme<'a>
impl<'a> Sync for StyledGrapheme<'a>
impl<'a> Unpin for StyledGrapheme<'a>
impl<'a> UnwindSafe for StyledGrapheme<'a>
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 moresource§impl<'a, T, U> Stylize<'a, T> for Uwhere
U: Styled<Item = T>,
impl<'a, T, U> Stylize<'a, T> for Uwhere
U: Styled<Item = T>,
fn bg(self, color: Color) -> T
fn fg<S>(self, color: S) -> T
fn add_modifier(self, modifier: Modifier) -> T
fn remove_modifier(self, modifier: Modifier) -> T
fn reset(self) -> T
source§fn on_magenta(self) -> T
fn on_magenta(self) -> T
Sets the background color to
magenta
.source§fn on_dark_gray(self) -> T
fn on_dark_gray(self) -> T
Sets the background color to
dark_gray
.source§fn on_light_red(self) -> T
fn on_light_red(self) -> T
Sets the background color to
light_red
.source§fn light_green(self) -> T
fn light_green(self) -> T
Sets the foreground color to
light_green
.source§fn on_light_green(self) -> T
fn on_light_green(self) -> T
Sets the background color to
light_green
.source§fn light_yellow(self) -> T
fn light_yellow(self) -> T
Sets the foreground color to
light_yellow
.source§fn on_light_yellow(self) -> T
fn on_light_yellow(self) -> T
Sets the background color to
light_yellow
.source§fn light_blue(self) -> T
fn light_blue(self) -> T
Sets the foreground color to
light_blue
.source§fn on_light_blue(self) -> T
fn on_light_blue(self) -> T
Sets the background color to
light_blue
.source§fn light_magenta(self) -> T
fn light_magenta(self) -> T
Sets the foreground color to
light_magenta
.source§fn on_light_magenta(self) -> T
fn on_light_magenta(self) -> T
Sets the background color to
light_magenta
.source§fn light_cyan(self) -> T
fn light_cyan(self) -> T
Sets the foreground color to
light_cyan
.source§fn on_light_cyan(self) -> T
fn on_light_cyan(self) -> T
Sets the background color to
light_cyan
.source§fn not_italic(self) -> T
fn not_italic(self) -> T
Removes the
ITALIC
modifier.source§fn underlined(self) -> T
fn underlined(self) -> T
Adds the
UNDERLINED
modifier.source§fn not_underlined(self) -> T
fn not_underlined(self) -> T
Removes the
UNDERLINED
modifier.source§fn slow_blink(self) -> T
fn slow_blink(self) -> T
Adds the
SLOW_BLINK
modifier.source§fn not_slow_blink(self) -> T
fn not_slow_blink(self) -> T
Removes the
SLOW_BLINK
modifier.source§fn rapid_blink(self) -> T
fn rapid_blink(self) -> T
Adds the
RAPID_BLINK
modifier.source§fn not_rapid_blink(self) -> T
fn not_rapid_blink(self) -> T
Removes the
RAPID_BLINK
modifier.source§fn not_reversed(self) -> T
fn not_reversed(self) -> T
Removes the
REVERSED
modifier.Adds the
HIDDEN
modifier.Removes the
HIDDEN
modifier.source§fn crossed_out(self) -> T
fn crossed_out(self) -> T
Adds the
CROSSED_OUT
modifier.source§fn not_crossed_out(self) -> T
fn not_crossed_out(self) -> T
Removes the
CROSSED_OUT
modifier.