Struct regex_cache::CachedRegex
[−]
[src]
pub struct CachedRegex { /* fields omitted */ }
Methods
impl CachedRegex
[src]
fn new(
cache: Arc<Mutex<RegexCache>>,
source: &str
) -> Result<CachedRegex, Error>
cache: Arc<Mutex<RegexCache>>,
source: &str
) -> Result<CachedRegex, Error>
Create a new cached Regex
for the given source, checking the syntax is
valid.
fn is_match(&self, text: &str) -> bool
Refer to Regex::is_match
.
fn find<'t>(&self, text: &'t str) -> Option<Match<'t>>
Refer to Regex::find
.
fn captures<'t>(&self, text: &'t str) -> Option<Captures<'t>>
Refer to Regex::captures
.
fn replace<'t, R: Replacer>(&self, text: &'t str, rep: R) -> Cow<'t, str>
Refer to Regex::replace
.
fn replace_all<'t, R: Replacer>(&self, text: &'t str, rep: R) -> Cow<'t, str>
Refer to Regex::replace_all
.
fn shortest_match(&self, text: &str) -> Option<usize>
Refer to Regex::shortest_match
.
fn captures_len(&self) -> usize
fn as_str(&self) -> &str
Trait Implementations
impl Clone for CachedRegex
[src]
fn clone(&self) -> CachedRegex
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more