pub trait LazyReplaceDisplay: Sized {
// Required method
fn replace_display<'a, R>(
self,
pat: &'a str,
replacement: R,
) -> ReplaceDisplay<'a, Self, R>;
}
Expand description
A convenience trait to allow you to call .replace_display
on anything that implements fmt::Display
.
Required Methods§
Sourcefn replace_display<'a, R>(
self,
pat: &'a str,
replacement: R,
) -> ReplaceDisplay<'a, Self, R>
fn replace_display<'a, R>( self, pat: &'a str, replacement: R, ) -> ReplaceDisplay<'a, Self, R>
Create a struct implementing Display
that will display this string with the specified pattern replaced with the specified replacement
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.