pub struct Span {
pub text: String,
pub bold: bool,
pub italic: bool,
pub underline: bool,
pub strikethrough: bool,
pub color: Option<Color>,
pub link: Option<String>,
}Expand description
A run of text in a Text::rich, with its own
settings. What a span doesn’t set comes from the text: its inherited
font, color and decorations.
Fields§
§text: StringThe text. A line break in it starts a new line.
bold: boolWeight 700 on the text’s font.
italic: boolThe text’s font, italic.
underline: boolA line under the span.
strikethrough: boolA line through the span.
color: Option<Color>The span’s color, or the text’s for None.
link: Option<String>A URL handed to the text’s on_link when
the span is clicked. It draws as its other settings say.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Span
Auto Trait Implementations§
impl Forget for Span
impl Freeze for Span
impl Move for Span
impl RefUnwindSafe for Span
impl Send for Span
impl Sync for Span
impl Unpin for Span
impl UnsafeUnpin for Span
impl UnwindSafe for Span
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