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.
Object Safety§
This trait is not object safe.