pub trait Replace<'a> {
// Required methods
fn replace_cow<P: Pattern>(self, from: P, to: &str) -> Cow<'a, str>;
fn replacen_cow<P: Pattern>(
self,
from: P,
to: &str,
count: usize,
) -> Cow<'a, str>;
}Available on crate feature
alloc only.Expand description
To extend str and Cow<str> to have replace_cow and replacen_cow methods.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".