[][src]Struct regex_cache::CachedRegex

pub struct CachedRegex { /* fields omitted */ }

Implementations

impl CachedRegex[src]

pub fn new(
    cache: Arc<Mutex<RegexCache>>,
    source: &str
) -> Result<CachedRegex, Error>
[src]

Create a new cached Regex for the given source, checking the syntax is valid.

pub fn new_unchecked(cache: Arc<Mutex<RegexCache>>, source: &str) -> CachedRegex[src]

Create a new cached Regex for the given source, without checking if the syntax is valid.

Only use this if you know that the syntax is valid or you are ready to handle potential syntax errors later on.

pub fn is_match(&self, text: &str) -> bool[src]

Refer to Regex::is_match.

pub fn find<'t>(&self, text: &'t str) -> Option<Match<'t>>[src]

Refer to Regex::find.

pub fn captures<'t>(&self, text: &'t str) -> Option<Captures<'t>>[src]

Refer to Regex::captures.

pub fn replace<'t, R: Replacer>(&self, text: &'t str, rep: R) -> Cow<'t, str>[src]

Refer to Regex::replace.

pub fn replace_all<'t, R: Replacer>(
    &self,
    text: &'t str,
    rep: R
) -> Cow<'t, str>
[src]

Refer to Regex::replace_all.

pub fn shortest_match(&self, text: &str) -> Option<usize>[src]

Refer to Regex::shortest_match.

pub fn captures_len(&self) -> usize[src]

pub fn as_str(&self) -> &str[src]

Trait Implementations

impl Clone for CachedRegex[src]

impl Debug for CachedRegex[src]

impl Display for CachedRegex[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.