trait StockStringMods: AsRef<str> + Sized {
// Provided methods
fn replace1(&self, replacement: &str) -> String { ... }
fn replace2(&self, replacement: &str) -> String { ... }
fn replace3(&self, replacement: &str) -> String { ... }
}
Expand description
Helper trait only meant to be implemented for String
.
Provided Methods§
Sourcefn replace1(&self, replacement: &str) -> String
fn replace1(&self, replacement: &str) -> String
Substitutes the first replacement value if one is present.
Sourcefn replace2(&self, replacement: &str) -> String
fn replace2(&self, replacement: &str) -> String
Substitutes the second replacement value if one is present.
Be aware you probably should have also called StockStringMods::replace1
if
you are calling this.
Sourcefn replace3(&self, replacement: &str) -> String
fn replace3(&self, replacement: &str) -> String
Substitutes the third replacement value if one is present.
Be aware you probably should have also called StockStringMods::replace1
and
StockStringMods::replace2
if you are calling this.
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.