Trait regex_try::RegexTry [−][src]
Defines the additional methods for Regex.
The replacer is always a function of type FnMut(&Captures) -> Result<String, E>
.
Required methods
fn try_replacen<'t>(
&self,
text: &'t str,
limit: usize,
rep: F
) -> Result<Cow<'t, str>, E>
[src]
&self,
text: &'t str,
limit: usize,
rep: F
) -> Result<Cow<'t, str>, E>
See Regex::replacen
fn try_replace<'t>(&self, text: &'t str, rep: F) -> Result<Cow<'t, str>, E>
[src]
See Regex::replace
fn try_replace_all<'t>(&self, text: &'t str, rep: F) -> Result<Cow<'t, str>, E>
[src]
Implementations on Foreign Types
impl<F, E> RegexTry<F, E> for Regex where
F: FnMut(&Captures<'_>) -> Result<String, E>,
[src]
F: FnMut(&Captures<'_>) -> Result<String, E>,
fn try_replacen<'t>(
&self,
text: &'t str,
limit: usize,
rep: F
) -> Result<Cow<'t, str>, E>
[src]
&self,
text: &'t str,
limit: usize,
rep: F
) -> Result<Cow<'t, str>, E>