Struct papergrid::records::vec_records::Text
source · 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: PartialEq> PartialEq for Text<S>
impl<S: PartialEq> PartialEq for Text<S>
source§impl<S: PartialOrd> PartialOrd for Text<S>
impl<S: PartialOrd> PartialOrd for Text<S>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)