pub enum Truncate {
None,
End,
Start,
Middle,
}Expand description
What text does with text that is wider than its rectangle.
The text is shortened on a grapheme boundary (never inside a character) and an ellipsis (…),
measured in the same font, marks the cut. Truncation applies to single-line text; text that
contains a newline is left alone.
Variants§
None
Don’t shorten the text; it is clipped (or wrapped) as before.
End
Keep the start and cut the end: Quarterly rep….
Start
Keep the end and cut the start: …report.txt.
Middle
Keep both ends and cut the middle: Quart….txt, for paths and file names.
Trait Implementations§
impl Copy for Truncate
impl Eq for Truncate
impl StructuralPartialEq for Truncate
Auto Trait Implementations§
impl Freeze for Truncate
impl RefUnwindSafe for Truncate
impl Send for Truncate
impl Sync for Truncate
impl Unpin for Truncate
impl UnsafeUnpin for Truncate
impl UnwindSafe for Truncate
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