pub struct TokenConstraint {
pub description: String,
pub pattern: ConstraintPattern,
pub source_rule: String,
pub hash: [u8; 32],
}Expand description
A constraint on token generation
Fields§
§description: StringHuman-readable description
pattern: ConstraintPatternPattern that matches forbidden tokens/sequences
source_rule: StringSource rule that created this constraint
hash: [u8; 32]Constraint hash for verification
Trait Implementations§
Source§impl Clone for TokenConstraint
impl Clone for TokenConstraint
Source§fn clone(&self) -> TokenConstraint
fn clone(&self) -> TokenConstraint
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 TokenConstraint
impl Debug for TokenConstraint
Source§impl<'de> Deserialize<'de> for TokenConstraint
impl<'de> Deserialize<'de> for TokenConstraint
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 TokenConstraint
impl RefUnwindSafe for TokenConstraint
impl Send for TokenConstraint
impl Sync for TokenConstraint
impl Unpin for TokenConstraint
impl UnwindSafe for TokenConstraint
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