pub struct Label(/* private fields */);Implementations§
Trait Implementations§
Source§impl Cell for Label
impl Cell for Label
Source§fn background(&self) -> Color
fn background(&self) -> Color
Background color of cell.
Source§fn pad(&self, width: usize) -> <Label as Cell>::Padded
fn pad(&self, width: usize) -> <Label as Cell>::Padded
Pad the cell so that it is the given width, while keeping the content left-aligned.
Source§impl Element for Label
impl Element for Label
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<(), Error>where
Self: Sized,
fn write(&self, constraints: Constraint) -> Result<(), Error>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 Label
impl RefUnwindSafe for Label
impl Send for Label
impl Sync for Label
impl Unpin for Label
impl UnwindSafe for Label
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more