pub struct CompiledLikePattern { /* private fields */ }Expand description
A LIKE/ILIKE pattern compiled once for repeated evaluation. ASCII values use a byte matcher; Unicode retains character-oriented _ semantics and contextual lowercase rules.
Implementations§
Source§impl CompiledLikePattern
impl CompiledLikePattern
pub fn new(pattern: &str, case_insensitive: bool) -> Self
pub fn from_value(pattern: &Value, case_insensitive: bool) -> Result<Self>
pub fn with_escape( pattern: &str, case_insensitive: bool, escape: Option<&str>, ) -> Result<Self>
Sourcepub fn with_escape_with_control(
pattern: &str,
case_insensitive: bool,
escape: Option<&str>,
control: &ProductionControl<'_>,
) -> Result<Self>
pub fn with_escape_with_control( pattern: &str, case_insensitive: bool, escape: Option<&str>, control: &ProductionControl<'_>, ) -> Result<Self>
Compile while keeping each native token buffer under the supplied owner.
pub fn is_match(&self, haystack: &str) -> bool
pub fn try_is_match(&self, haystack: &str) -> Result<bool>
pub fn try_is_match_with_control( &self, haystack: &str, control: &ProductionControl<'_>, ) -> Result<bool>
pub fn matches_value(&self, haystack: &Value) -> bool
pub fn try_matches_value(&self, haystack: &Value) -> Result<bool>
pub fn try_matches_value_with_control( &self, haystack: &Value, control: &ProductionControl<'_>, ) -> Result<bool>
Auto Trait Implementations§
impl Freeze for CompiledLikePattern
impl RefUnwindSafe for CompiledLikePattern
impl Send for CompiledLikePattern
impl Sync for CompiledLikePattern
impl Unpin for CompiledLikePattern
impl UnsafeUnpin for CompiledLikePattern
impl UnwindSafe for CompiledLikePattern
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more