Trait LazyReplaceDisplay

Source
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§

Source

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.

Implementors§

Source§

impl<T> LazyReplaceDisplay for T
where T: Display,