pub struct Line {
pub spans: Vec<Span>,
}Expand description
A horizontal sequence of Spans rendered as a single line.
§Examples
use retroglyph_core::text::{Line, Span};
use retroglyph_core::color::Style;
use retroglyph_core::color::Color;
let line = Line::from(vec![
Span::raw("HP: "),
Span::styled("100", Style::new().fg(Color::GREEN)),
]);
assert_eq!(line.width(), 7);Fields§
§spans: Vec<Span>The spans that make up this line.
Implementations§
Trait Implementations§
impl Eq for Line
impl StructuralPartialEq for Line
Auto Trait Implementations§
impl Freeze for Line
impl RefUnwindSafe for Line
impl Send for Line
impl Sync for Line
impl Unpin for Line
impl UnsafeUnpin for Line
impl UnwindSafe for Line
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