deltachat::stock_str

Trait StockStringMods

Source
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.

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.

Implementations on Foreign Types§

Source§

impl StockStringMods for String

Implementors§