pub trait StringDecorator<T: AsRef<str>> {
// Required methods
fn fg(self, color: impl Into<LinearRgba>) -> DecoratedString<T>;
fn bg(self, color: impl Into<LinearRgba>) -> DecoratedString<T>;
fn delimiters(self, delimiters: impl AsRef<str>) -> DecoratedString<T>;
fn clear_colors(self) -> DecoratedString<T>;
}
Expand description
A trait for creating a DecoratedString.
Required Methods§
Sourcefn fg(self, color: impl Into<LinearRgba>) -> DecoratedString<T>
fn fg(self, color: impl Into<LinearRgba>) -> DecoratedString<T>
Sets the foreground color for string tiles.
Sourcefn bg(self, color: impl Into<LinearRgba>) -> DecoratedString<T>
fn bg(self, color: impl Into<LinearRgba>) -> DecoratedString<T>
Sets the background color for string tiles.
Sourcefn delimiters(self, delimiters: impl AsRef<str>) -> DecoratedString<T>
fn delimiters(self, delimiters: impl AsRef<str>) -> DecoratedString<T>
Add a pair of delimiters to the string. The first character will be the opening delimiter and the second character will be the closing delimiter.
Sourcefn clear_colors(self) -> DecoratedString<T>
fn clear_colors(self) -> DecoratedString<T>
Sets the string tile colors to match the terminal’s clear tile. This will override the string’s fg and bg colors.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.