[][src]Struct term_grid::Display

pub struct Display<'grid> { /* fields omitted */ }

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.