pub struct Segment {
pub spans: Vec<Span>,
pub newline: bool,
}Expand description
A segment of renderable output.
Fields§
§spans: Vec<Span>The styled spans that make up this segment
newline: boolWhether this segment ends with a newline
Implementations§
Source§impl Segment
impl Segment
Sourcepub fn empty_line() -> Self
pub fn empty_line() -> Self
Create an empty line segment.
Sourcepub fn plain_text(&self) -> String
pub fn plain_text(&self) -> String
Get the plain text content.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Segment
impl RefUnwindSafe for Segment
impl Send for Segment
impl Sync for Segment
impl Unpin for Segment
impl UnwindSafe for Segment
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