pub enum StringBounds<'a> {
StartsWith(&'a str, bool, CaseMatchMode),
EndsWith(&'a str, bool, CaseMatchMode),
Contains(&'a str, bool, CaseMatchMode),
Whole(&'a str, bool, CaseMatchMode),
And(Vec<StringBounds<'a>>),
Or(Vec<StringBounds<'a>>),
}
Expand description
Defines the matching bounds of simple string matches with case-insensitive/sensitive variants and accepting the string pattern and positivity flag as arguments
Variants§
StartsWith(&'a str, bool, CaseMatchMode)
EndsWith(&'a str, bool, CaseMatchMode)
Contains(&'a str, bool, CaseMatchMode)
Whole(&'a str, bool, CaseMatchMode)
And(Vec<StringBounds<'a>>)
Or(Vec<StringBounds<'a>>)
Implementations§
Source§impl<'a> StringBounds<'a>
impl<'a> StringBounds<'a>
pub fn new( mode: BoundsPosition, txt: &'a str, is_positive: bool, case_mode: CaseMatchMode, ) -> StringBounds<'a>
pub fn case_insensitive(&self) -> bool
pub fn case_mode(&self) -> CaseMatchMode
pub fn pattern(&self) -> &'a str
pub fn is_positive(&self) -> bool
pub fn starts_with(&self) -> bool
pub fn ends_with(&self) -> bool
pub fn matches_whole(&self) -> bool
Trait Implementations§
Source§impl<'a> Clone for StringBounds<'a>
impl<'a> Clone for StringBounds<'a>
Source§fn clone(&self) -> StringBounds<'a>
fn clone(&self) -> StringBounds<'a>
Returns a copy 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 moreAuto Trait Implementations§
impl<'a> Freeze for StringBounds<'a>
impl<'a> RefUnwindSafe for StringBounds<'a>
impl<'a> Send for StringBounds<'a>
impl<'a> Sync for StringBounds<'a>
impl<'a> Unpin for StringBounds<'a>
impl<'a> UnwindSafe for StringBounds<'a>
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