[][src]Trait text_grid::CellSource

pub trait CellSource {
    fn fmt(&self, s: &mut String);

    fn style(&self) -> CellStyle { ... }
fn default_style() -> CellStyle { ... } }

A data structure that can be formatted into cell.

Normally, cell() or macro@cell is used to create a value that implements CellSource.

Required methods

fn fmt(&self, s: &mut String)

Output the cell text to given buffer.

Loading content...

Provided methods

fn style(&self) -> CellStyle

Return cell's style.

fn default_style() -> CellStyle

Return cell's default style that associated with Self type.

Loading content...

Implementations on Foreign Types

impl<T: CellSource, '_> CellSource for &'_ T[src]

impl<T: CellSource, '_> CellSource for &'_ mut T[src]

impl<T: CellSource> CellSource for Option<T>[src]

impl CellSource for u8[src]

fn style(&self) -> CellStyle[src]

impl CellSource for i8[src]

fn style(&self) -> CellStyle[src]

impl CellSource for u16[src]

fn style(&self) -> CellStyle[src]

impl CellSource for i16[src]

fn style(&self) -> CellStyle[src]

impl CellSource for u32[src]

fn style(&self) -> CellStyle[src]

impl CellSource for i32[src]

fn style(&self) -> CellStyle[src]

impl CellSource for u64[src]

fn style(&self) -> CellStyle[src]

impl CellSource for i64[src]

fn style(&self) -> CellStyle[src]

impl CellSource for u128[src]

fn style(&self) -> CellStyle[src]

impl CellSource for i128[src]

fn style(&self) -> CellStyle[src]

impl CellSource for isize[src]

fn style(&self) -> CellStyle[src]

impl CellSource for usize[src]

fn style(&self) -> CellStyle[src]

impl CellSource for f32[src]

fn style(&self) -> CellStyle[src]

impl CellSource for f64[src]

fn style(&self) -> CellStyle[src]

impl CellSource for String[src]

fn style(&self) -> CellStyle[src]

impl<'_> CellSource for &'_ str[src]

fn style(&self) -> CellStyle[src]

impl CellSource for char[src]

fn style(&self) -> CellStyle[src]

impl CellSource for bool[src]

fn style(&self) -> CellStyle[src]

Loading content...

Implementors

impl<T: CellSource> CellSource for Cell<T>[src]

fn default_style() -> CellStyle[src]

Loading content...