pub struct Span {
pub range: (usize, usize),
pub color: Option<Color>,
pub weight: Option<FontWeight>,
}Expand description
One styled range of the document — a token from the app’s own
tokenizer (a markdown bold run, a JSON string, a syntax-highlighted
keyword). None fields fall back to the widget’s own default text
color/weight, so a SpanSource only needs to describe what it wants
to OVERRIDE, not restate the whole style for every char.
Fields§
§range: (usize, usize)§color: Option<Color>§weight: Option<FontWeight>Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze 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