Struct libtableformat::table::row::Row[][src]

pub struct Row { /* fields omitted */ }

Table rows represent horizontal breakpoints.

Implementations

impl Row[src]

#[must_use]
pub fn new() -> Row
[src]

#[must_use]
pub fn from(cells: Vec<Cell>) -> Row
[src]

pub fn add_cell(&mut self, cell: Cell)[src]

#[must_use]
pub fn iter(self: &Row) -> CellIterator<'_>

Notable traits for CellIterator<'a>

impl<'a> Iterator for CellIterator<'a> type Item = &'a Cell;
[src]

#[must_use]
pub fn len(self: &Row) -> usize
[src]

#[must_use]
pub fn is_empty(self: &Row) -> bool
[src]

#[must_use]
pub fn format(
    self: &Row,
    border: &Border,
    column_breaks: &[CellWidth]
) -> String
[src]

Formats a table row.

Arguments

  • self - The table row to format.
  • border - The table border.
  • column_breaks - The breakpoints at which to wrap or truncate.

#[must_use]
pub fn measure_height(self: &Row, column_breaks: &[CellWidth]) -> usize
[src]

Measures the height of a table row.

Arguments

  • self - The table row being measured.
  • columns - The columns used to format the cells for this row.

Trait Implementations

impl Debug for Row[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Default for Row[src]

fn default() -> Self[src]

Returns the “default value” for a type. Read more

Auto Trait Implementations

impl RefUnwindSafe for Row

impl Send for Row

impl Sync for Row

impl Unpin for Row

impl UnwindSafe for Row

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.