pub struct Line { /* private fields */ }
Expand description
A line of text that has styling and can be displayed.
Implementations§
Trait Implementations§
Source§impl Cell for Line
impl Cell for Line
Source§fn pad(&self, width: usize) -> Self::Padded
fn pad(&self, width: usize) -> Self::Padded
Pad the cell so that it is the given width, while keeping the content left-aligned.
Source§fn truncate(&self, width: usize, delim: &str) -> Self::Truncated
fn truncate(&self, width: usize, delim: &str) -> Self::Truncated
Truncate cell if longer than given width. Shows the delimiter if truncated.
Source§fn background(&self) -> Color
fn background(&self) -> Color
Background color of cell.
Source§impl Element for Line
impl Element for Line
Source§fn size(&self, _parent: Constraint) -> Size
fn size(&self, _parent: Constraint) -> Size
Get the size of the element, in rows and columns.
Source§fn render(&self, _parent: Constraint) -> Vec<Line>
fn render(&self, _parent: Constraint) -> Vec<Line>
Render the element as lines of text that can be printed.
Source§fn columns(&self, parent: Constraint) -> usize
fn columns(&self, parent: Constraint) -> usize
Get the number of columns occupied by this element.
Source§fn rows(&self, parent: Constraint) -> usize
fn rows(&self, parent: Constraint) -> usize
Get the number of rows occupied by this element.
Source§fn write(&self, constraints: Constraint) -> Result<()>where
Self: Sized,
fn write(&self, constraints: Constraint) -> Result<()>where
Self: Sized,
Write using the given constraints to
stdout
.Source§fn display(&self, constraints: Constraint) -> String
fn display(&self, constraints: Constraint) -> String
Return a string representation of this element.
Auto Trait Implementations§
impl Freeze for Line
impl RefUnwindSafe for Line
impl Send for Line
impl Sync for Line
impl Unpin 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