Trait toipe::tui::HasLength

source ·
pub trait HasLength {
    // Required method
    fn length(&self) -> usize;
}
Expand description

Describes something that has a printable length.

For example, a string containing color characters has a different length when printed than the number of bytes or chars in it.

Required Methods§

source

fn length(&self) -> usize

number of char widths taken when printed on the terminal

Implementations on Foreign Types§

source§

impl HasLength for [Text]

NOTE: note to be confused with .len() which provides the number of elements in the slice.

source§

fn length(&self) -> usize

Implementors§