pub struct Segment<'a> {
pub text: Cow<'a, str>,
pub style: Style,
pub link: Option<Cow<'a, str>>,
}Expand description
A contiguous run of text sharing a single style.
Fields§
§text: Cow<'a, str>§style: Style§link: Option<Cow<'a, str>>Hyperlink target, when this run is part of one. The backend emits it as OSC 8 or degrades it to a numbered reference.
Implementations§
Trait Implementations§
impl<'a> StructuralPartialEq for Segment<'a>
Auto Trait Implementations§
impl<'a> Freeze for Segment<'a>
impl<'a> RefUnwindSafe for Segment<'a>
impl<'a> Send for Segment<'a>
impl<'a> Sync for Segment<'a>
impl<'a> Unpin for Segment<'a>
impl<'a> UnsafeUnpin for Segment<'a>
impl<'a> UnwindSafe for Segment<'a>
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