[−][src]Trait regex::Replacer
Replacer describes types that can be used to replace matches in a string.
Required methods
fn reg_replace(&mut self, caps: &Captures) -> Cow<str>
Returns a possibly owned string that is used to replace the match
corresponding to the caps capture group.
The 'a lifetime refers to the lifetime of a borrowed string when
a new owned string isn't needed (e.g., for NoExpand).
Provided methods
fn no_expand(&mut self) -> Option<Cow<str>>
Returns a possibly owned string that never needs expansion.
Implementations on Foreign Types
impl<'t> Replacer for &'t str[src]
fn reg_replace<'a>(&'a mut self, caps: &Captures) -> Cow<'a, str>[src]
fn no_expand(&mut self) -> Option<Cow<str>>[src]
Implementors
impl<'t> Replacer for NoExpand<'t>[src]
fn reg_replace(&mut self, _: &Captures) -> Cow<str>[src]
fn no_expand(&mut self) -> Option<Cow<str>>[src]
impl<F> Replacer for F where
F: FnMut(&Captures) -> String, [src]
F: FnMut(&Captures) -> String,