pub trait Truncate {
// Required method
fn truncate(&self) -> Self;
// Provided method
fn truncate_str(text: &str) -> &str { ... }
}
Expand description
This trait is implemented to allow truncated logging of secret data.
Required Methods§
Provided Methods§
Sourcefn truncate_str(text: &str) -> &str
fn truncate_str(text: &str) -> &str
Take the last 5 characters
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.