Enum string_patterns::enums::StringBounds
source · pub enum StringBounds<'a> {
StartsWithCi(&'a str, bool),
EndsWithCi(&'a str, bool),
ContainsCi(&'a str, bool),
StartsWithCs(&'a str, bool),
EndsWithCs(&'a str, bool),
ContainsCs(&'a str, bool),
}
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§
StartsWithCi(&'a str, bool)
EndsWithCi(&'a str, bool)
ContainsCi(&'a str, bool)
StartsWithCs(&'a str, bool)
EndsWithCs(&'a str, bool)
ContainsCs(&'a str, bool)
Implementations§
source§impl<'a> StringBounds<'a>
impl<'a> StringBounds<'a>
pub fn new( mode: u8, txt: &'a str, is_positive: bool, case_insensitive: bool ) -> StringBounds<'a>
pub fn case_insensitive(&self) -> bool
pub fn pattern(&self) -> &'a str
pub fn is_positive(&self) -> bool
pub fn starts_with(&self) -> bool
pub fn ends_with(&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> 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