pub enum Overflow {
Truncate {
at: TruncateAt,
marker: String,
},
Wrap {
indent: usize,
},
Clip,
Expand,
}Expand description
How a column handles content that exceeds its width.
Variants§
Truncate
Truncate content with an ellipsis marker.
Fields
§
at: TruncateAtWhere to truncate (start, middle, or end).
Wrap
Wrap content to multiple lines at word boundaries.
Clip
Hard cut without any marker.
Expand
Allow content to overflow (ignore width limit).
Implementations§
Source§impl Overflow
impl Overflow
Sourcepub fn truncate(at: TruncateAt) -> Self
pub fn truncate(at: TruncateAt) -> Self
Create a truncate overflow with default marker.
Sourcepub fn truncate_with_marker(at: TruncateAt, marker: impl Into<String>) -> Self
pub fn truncate_with_marker(at: TruncateAt, marker: impl Into<String>) -> Self
Create a truncate overflow with custom marker.
Sourcepub fn wrap_with_indent(indent: usize) -> Self
pub fn wrap_with_indent(indent: usize) -> Self
Create a wrap overflow with continuation indent.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Overflow
impl<'de> Deserialize<'de> for Overflow
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Overflow
impl StructuralPartialEq for Overflow
Auto Trait Implementations§
impl Freeze for Overflow
impl RefUnwindSafe for Overflow
impl Send for Overflow
impl Sync for Overflow
impl Unpin for Overflow
impl UnwindSafe for Overflow
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.