pub enum TruncationStyle<T: BoundedWidth> {
Left(T),
Right(T),
Inner(T),
}Expand description
Styles for simple truncation.
Variants§
Left(T)
Keeps the left text, truncates text on the right. Optional symbol added when truncation occurs.
Right(T)
Keeps the right text, truncates text on the left. Optional symbol added when truncation occurs.
Inner(T)
Keeps the outside text, truncates text on the inside. Optional symbol added when truncation occurs.
Trait Implementations§
Source§impl<T: Clone + BoundedWidth> Clone for TruncationStyle<T>
impl<T: Clone + BoundedWidth> Clone for TruncationStyle<T>
Source§fn clone(&self) -> TruncationStyle<T>
fn clone(&self) -> TruncationStyle<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug + BoundedWidth> Debug for TruncationStyle<T>
impl<T: Debug + BoundedWidth> Debug for TruncationStyle<T>
Source§impl<T, S> TruncationStrategy<T> for TruncationStyle<S>where
T: Truncateable,
S: BoundedWidth + WidthSliceable,
T::Output: Pushable<T::Output> + Pushable<S::Output> + Default + WidthSliceable,
impl<T, S> TruncationStrategy<T> for TruncationStyle<S>where
T: Truncateable,
S: BoundedWidth + WidthSliceable,
T::Output: Pushable<T::Output> + Pushable<S::Output> + Default + WidthSliceable,
Auto Trait Implementations§
impl<T> Freeze for TruncationStyle<T>where
T: Freeze,
impl<T> RefUnwindSafe for TruncationStyle<T>where
T: RefUnwindSafe,
impl<T> Send for TruncationStyle<T>where
T: Send,
impl<T> Sync for TruncationStyle<T>where
T: Sync,
impl<T> Unpin for TruncationStyle<T>where
T: Unpin,
impl<T> UnwindSafe for TruncationStyle<T>where
T: 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