Struct rckive_genpdf::style::StyledCow
source · Expand description
A Cow<'s, str>
with a Style
annotation.
Example
use rckive_genpdf::style;
let ss1 = style::StyledCow::new("bold", style::Effect::Bold);
let ss2 = style::StyledCow::new("red".to_owned(), style::Color::Rgb(255, 0, 0));
Fields§
§s: Cow<'s, str>
The annotated string.
style: Style
The style annotation.
Implementations§
Trait Implementations§
source§impl<'s> From<&'s StyledString> for StyledCow<'s>
impl<'s> From<&'s StyledString> for StyledCow<'s>
source§fn from(s: &'s StyledString) -> StyledCow<'s>
fn from(s: &'s StyledString) -> StyledCow<'s>
Converts to this type from the input type.
source§impl<'s> From<StyledString> for StyledCow<'s>
impl<'s> From<StyledString> for StyledCow<'s>
source§fn from(s: StyledString) -> StyledCow<'s>
fn from(s: StyledString) -> StyledCow<'s>
Converts to this type from the input type.