Trait regex_try::RegexTry[][src]

pub trait RegexTry<F, E> {
    fn try_replacen<'t>(
        &self,
        text: &'t str,
        limit: usize,
        rep: F
    ) -> Result<Cow<'t, str>, E>;
fn try_replace<'t>(&self, text: &'t str, rep: F) -> Result<Cow<'t, str>, E>;
fn try_replace_all<'t>(
        &self,
        text: &'t str,
        rep: F
    ) -> Result<Cow<'t, str>, E>; }

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]

fn try_replace<'t>(&self, text: &'t str, rep: F) -> Result<Cow<'t, str>, E>[src]

fn try_replace_all<'t>(&self, text: &'t str, rep: F) -> Result<Cow<'t, str>, E>[src]

Loading content...

Implementations on Foreign Types

impl<F, E> RegexTry<F, E> for Regex where
    F: FnMut(&Captures<'_>) -> Result<String, E>, 
[src]

Loading content...

Implementors

Loading content...