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§

source

fn replace1(&self, replacement: &str) -> String

Substitutes the first replacement value if one is present.

source

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.

source

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.

Implementations on Foreign Types§

source§

impl StockStringMods for String

Implementors§