#[non_exhaustive]pub struct Span {
pub range: Range<usize>,
pub color: Option<Color>,
pub size_px: Option<f32>,
}Expand description
A styled part of a paragraph’s text.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.range: Range<usize>Byte range of the text it styles; must lie on character boundaries.
color: Option<Color>Text color, if different from the paragraph’s.
size_px: Option<f32>Font size in pixels per em, if different from the paragraph’s.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Span
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