Fitable

Trait Fitable 

Source
pub trait Fitable<T: Truncateable>: HasWidth {
    // Required method
    fn truncate(&self, width: usize) -> Option<T>;
}
Expand description

Widgets that can be truncated to fit in a provided width.

Required Methods§

Source

fn truncate(&self, width: usize) -> Option<T>

Truncate self to fit in a given width.

Implementors§

Source§

impl<'a, T, U> Fitable<<T as WidthSliceable>::Output> for TextWidget<'a, T, U>