papergrid::width

Trait WidthFunc

Source
pub trait WidthFunc {
    // Required methods
    fn width(&self, text: &str) -> usize;
    fn width_multiline(&self, text: &str) -> usize;
}
Expand description

A width function.

Required Methods§

Source

fn width(&self, text: &str) -> usize

Calculates a width of a string.

Source

fn width_multiline(&self, text: &str) -> usize

Calculates a width of a multiline string.

Implementations on Foreign Types§

Source§

impl<W> WidthFunc for &W
where W: WidthFunc,

Source§

fn width(&self, text: &str) -> usize

Source§

fn width_multiline(&self, text: &str) -> usize

Implementors§