pub trait TruncatedDisplay {
// Required method
fn truncated_display(&self, max_length: usize) -> impl Debug + Display;
}Expand description
Auto-truncate objects at a given length for displaying
Required Methods§
Sourcefn truncated_display(&self, max_length: usize) -> impl Debug + Display
fn truncated_display(&self, max_length: usize) -> impl Debug + Display
Display self with at most max_length chars, including a trailing ‘…’ in case of
truncation.
The returned object implements both Debug and Display, depending on how you want to
display.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".