pub trait StringIfEmpty<X: ToString> {
// Required method
fn string_if_empty(&self, empty_string: X) -> String;
}Expand description
Substitute a placeholder for an empty string.
Required Methods§
Sourcefn string_if_empty(&self, empty_string: X) -> String
fn string_if_empty(&self, empty_string: X) -> String
Return empty_string if this is empty, otherwise the value itself.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".