Skip to main content

KissReplace

Trait KissReplace 

Source
pub trait KissReplace {
    // Required method
    fn replace_str(&self, input: &str) -> String;

    // Provided methods
    fn replace(&self, sources: Vec<String>) -> Vec<String> { ... }
    fn replace_mut(&self, sources: &mut Vec<String>) { ... }
    fn replace_paths(&self, paths: Vec<PathBuf>) -> Vec<PathBuf> { ... }
}

Required Methods§

Source

fn replace_str(&self, input: &str) -> String

Replace @VAR@ in single string

Provided Methods§

Source

fn replace(&self, sources: Vec<String>) -> Vec<String>

Immutable string replacement

Source

fn replace_mut(&self, sources: &mut Vec<String>)

Mutable string replacement (in-place, more alloc-efficient)

Source

fn replace_paths(&self, paths: Vec<PathBuf>) -> Vec<PathBuf>

Replace @VAR@ in paths

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§