pub enum ConstraintPattern {
ExactToken(u32),
TokenSequence(Vec<u32>),
TextPattern(String),
SemanticCategory(String),
CustomPredicate(Vec<u8>),
}Expand description
Pattern types for constraints
Variants§
ExactToken(u32)
Exact token ID forbidden
TokenSequence(Vec<u32>)
Token sequence forbidden
TextPattern(String)
Regex pattern on decoded text
SemanticCategory(String)
Semantic category (requires classifier)
CustomPredicate(Vec<u8>)
Custom predicate (WASM function)
Trait Implementations§
Source§impl Clone for ConstraintPattern
impl Clone for ConstraintPattern
Source§fn clone(&self) -> ConstraintPattern
fn clone(&self) -> ConstraintPattern
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 ConstraintPattern
impl Debug for ConstraintPattern
Source§impl<'de> Deserialize<'de> for ConstraintPattern
impl<'de> Deserialize<'de> for ConstraintPattern
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ConstraintPattern
impl RefUnwindSafe for ConstraintPattern
impl Send for ConstraintPattern
impl Sync for ConstraintPattern
impl Unpin for ConstraintPattern
impl UnwindSafe for ConstraintPattern
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