pub trait LazyReplace {
// Required method
fn lazy_replace<P, R>(
&self,
pat: P,
replacement: R,
) -> ReplacedString<'_, P, R>;
}
Expand description
A convenience trait to allow you to call .lazy_replace
on anything that can deref to a &str
.
Required Methods§
Sourcefn lazy_replace<P, R>(&self, pat: P, replacement: R) -> ReplacedString<'_, P, R>
fn lazy_replace<P, R>(&self, pat: P, replacement: R) -> ReplacedString<'_, P, 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.