#[repr(u8)]pub enum ExactTextProfileV1 {
BinaryUtf8V1 = 1,
UnicodeFoldV1 = 2,
}Expand description
Closed exact matching profiles.
Variants§
BinaryUtf8V1 = 1
Compare exact UTF-8 byte sequences.
UnicodeFoldV1 = 2
Compare under ADR-0172’s frozen unicode_fold_v1 transform: Unicode
17.0.0 NFKC followed by full non-Turkic case folding. Values and needles
are folded by the same function, so matching is case- and
compatibility-insensitive while remaining exact and bytewise.
Implementations§
Source§impl ExactTextProfileV1
impl ExactTextProfileV1
Sourcepub const fn from_discriminant(value: u8) -> Option<Self>
pub const fn from_discriminant(value: u8) -> Option<Self>
Decodes a durable profile discriminant.
Sourcepub fn matched_form(self, value: &str) -> String
pub fn matched_form(self, value: &str) -> String
Applies this profile’s transform to matching text.
A stored value and a submitted needle must both pass through here, or matching is not symmetric.
Source§impl ExactTextProfileV1
impl ExactTextProfileV1
Sourcepub fn bind_needle(
self,
value: &str,
) -> Result<ExactTextNeedleV1, ExactTextBindErrorV1>
pub fn bind_needle( self, value: &str, ) -> Result<ExactTextNeedleV1, ExactTextBindErrorV1>
Binds one nonempty canonical UTF-8 needle under the fixed V1 maximum.
Sourcepub fn matches(
self,
operator: ExactTextOperatorV1,
value: ExactTextFieldValueV1<'_>,
needle: &ExactTextNeedleV1,
) -> bool
pub fn matches( self, operator: ExactTextOperatorV1, value: ExactTextFieldValueV1<'_>, needle: &ExactTextNeedleV1, ) -> bool
Evaluates the frozen truth table. Missing and null never match.
Trait Implementations§
Source§impl Clone for ExactTextProfileV1
impl Clone for ExactTextProfileV1
impl Copy for ExactTextProfileV1
Source§impl Debug for ExactTextProfileV1
impl Debug for ExactTextProfileV1
impl Eq for ExactTextProfileV1
Source§impl Hash for ExactTextProfileV1
impl Hash for ExactTextProfileV1
Source§impl Ord for ExactTextProfileV1
impl Ord for ExactTextProfileV1
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ExactTextProfileV1
impl PartialEq for ExactTextProfileV1
Source§impl PartialOrd for ExactTextProfileV1
impl PartialOrd for ExactTextProfileV1
impl StructuralPartialEq for ExactTextProfileV1
Auto Trait Implementations§
impl Freeze for ExactTextProfileV1
impl RefUnwindSafe for ExactTextProfileV1
impl Send for ExactTextProfileV1
impl Sync for ExactTextProfileV1
impl Unpin for ExactTextProfileV1
impl UnsafeUnpin for ExactTextProfileV1
impl UnwindSafe for ExactTextProfileV1
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