pub struct Display<'grid> { /* private fields */ }Expand description
A displayable representation of a Grid.
This type implements Display, so you can get the textual version
of the grid by calling .to_string().
Implementations§
Source§impl Display<'_>
impl Display<'_>
Sourcepub fn width(&self) -> Width
pub fn width(&self) -> Width
Returns how many columns this display takes up, based on the separator width and the number and width of the columns.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Returns whether this display takes up as many columns as were allotted to it.
It’s possible to construct tables that don’t actually use up all the columns that they could, such as when there are more columns than cells! In this case, a column would have a width of zero. This just checks for that.
Trait Implementations§
impl<'grid> StructuralPartialEq for Display<'grid>
Auto Trait Implementations§
impl<'grid> Freeze for Display<'grid>
impl<'grid> RefUnwindSafe for Display<'grid>
impl<'grid> Send for Display<'grid>
impl<'grid> Sync for Display<'grid>
impl<'grid> Unpin for Display<'grid>
impl<'grid> UnwindSafe for Display<'grid>
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