pub struct MaybeRegex {
pub is_negative: bool,
/* private fields */
}
Fields§
§is_negative: bool
Implementations§
Source§impl MaybeRegex
impl MaybeRegex
pub fn new<S: AsRef<str>>(s: S) -> Self
pub fn from<S: AsRef<str>>(s: S) -> Self
pub fn as_case_sensitive(self) -> Self
pub fn is_regex(&self) -> bool
pub fn matches<S: AsRef<str>>(&self, haystack: S) -> bool
pub fn is_contained_within<S: AsRef<str>>(&self, haystack: S) -> bool
pub fn replace( &self, str: String, to_string: impl Fn(&str) -> String + 'static, ) -> String
pub fn to_str(&self) -> &str
pub fn to_string(&self) -> String
pub fn match_indices<S: AsRef<str>>(&self, other: S) -> Vec<(usize, usize)>
pub fn matches_exactly<S: AsRef<str>>(&self, other: S) -> bool
pub fn starts_with<S: AsRef<str>>(&self, s: S) -> bool
Trait Implementations§
Source§impl Clone for MaybeRegex
impl Clone for MaybeRegex
Source§fn clone(&self) -> MaybeRegex
fn clone(&self) -> MaybeRegex
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MaybeRegex
impl Debug for MaybeRegex
Source§impl PartialEq for MaybeRegex
impl PartialEq for MaybeRegex
Auto Trait Implementations§
impl Freeze for MaybeRegex
impl RefUnwindSafe for MaybeRegex
impl Send for MaybeRegex
impl Sync for MaybeRegex
impl Unpin for MaybeRegex
impl UnwindSafe for MaybeRegex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more