pub enum Trunc {
End,
Start,
Middle,
NewLine,
}Expand description
How to handle content that does not fit inside the available column width.
Truncation is applied after the column width is resolved. If you need the
full content to remain visible, use Trunc::NewLine to wrap onto more
lines instead of clipping the text.
§Examples
use tiny_table::{Cell, Trunc};
let cell = Cell::new("abcdefghij").truncate(Trunc::Middle);Variants§
End
Keep the beginning of the text and add an ellipsis at the end.
Start
Keep the end of the text and add an ellipsis at the start.
Middle
Keep the start and end of the text with an ellipsis in the middle.
NewLine
Wrap onto multiple lines instead of truncating.
Trait Implementations§
impl Copy for Trunc
impl Eq for Trunc
impl StructuralPartialEq for Trunc
Auto Trait Implementations§
impl Freeze for Trunc
impl RefUnwindSafe for Trunc
impl Send for Trunc
impl Sync for Trunc
impl Unpin for Trunc
impl UnsafeUnpin for Trunc
impl UnwindSafe for Trunc
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