[−][src]Struct regex_cache::CachedRegex
Implementations
impl CachedRegex
[src]
pub fn new(
cache: Arc<Mutex<RegexCache>>,
source: &str
) -> Result<CachedRegex, Error>
[src]
cache: Arc<Mutex<RegexCache>>,
source: &str
) -> Result<CachedRegex, Error>
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]
&self,
text: &'t str,
rep: R
) -> Cow<'t, str>
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]
fn clone(&self) -> CachedRegex
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for CachedRegex
[src]
impl Display for CachedRegex
[src]
Auto Trait Implementations
impl RefUnwindSafe for CachedRegex
impl Send for CachedRegex
impl Sync for CachedRegex
impl Unpin for CachedRegex
impl UnwindSafe for CachedRegex
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,