[−][src]Struct term_grid::Display
A displayable representation of a Grid
.
This type implements Display
, so you can get the textual version
of the grid by calling .to_string()
.
Methods
impl<'_> Display<'_>
[src]
pub fn width(&self) -> Width
[src]
Returns how many columns this display takes up, based on the separator width and the number and width of the columns.
pub fn row_count(&self) -> usize
[src]
Returns how many rows this display takes up.
pub fn is_complete(&self) -> bool
[src]
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> Debug for Display<'grid>
[src]
impl<'_> Display for Display<'_>
[src]
impl<'grid> PartialEq<Display<'grid>> for Display<'grid>
[src]
impl<'grid> StructuralPartialEq for Display<'grid>
[src]
Auto Trait Implementations
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,