pub struct Text<S> { /* private fields */ }
Expand description
The struct is a Cell implementation which keeps width information pre allocated.
Implementations§
Source§impl<S> Text<S>
impl<S> Text<S>
Sourcepub fn exact(text: S, width: usize, lines: Vec<StrWithWidth<'static>>) -> Self
pub fn exact(text: S, width: usize, lines: Vec<StrWithWidth<'static>>) -> Self
Creates a new instance of the structure with a single line.
Sourcepub fn into_inner(self) -> S
pub fn into_inner(self) -> S
Return a original text value.
Trait Implementations§
Source§impl<S> Cell for Text<S>
impl<S> Cell for Text<S>
Source§fn count_lines(&self) -> usize
fn count_lines(&self) -> usize
Returns a number of lines cell has.
Source§fn line_width(&self, i: usize) -> usize
fn line_width(&self, i: usize) -> usize
Returns a width of cell line.
Source§impl<S: Ord> Ord for Text<S>
impl<S: Ord> Ord for Text<S>
Source§impl<S: PartialOrd> PartialOrd for Text<S>
impl<S: PartialOrd> PartialOrd for Text<S>
impl<S: Eq> Eq for Text<S>
impl<S> StructuralPartialEq for Text<S>
Auto Trait Implementations§
impl<S> Freeze for Text<S>where
S: Freeze,
impl<S> RefUnwindSafe for Text<S>where
S: RefUnwindSafe,
impl<S> Send for Text<S>where
S: Send,
impl<S> Sync for Text<S>where
S: Sync,
impl<S> Unpin for Text<S>where
S: Unpin,
impl<S> UnwindSafe for Text<S>where
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more