pub enum SubtypeConstraint {
SingleValue(ConstraintValue),
ValueRange {
min: ConstraintValue,
max: ConstraintValue,
},
SizeConstraint(Box<SubtypeConstraint>),
PermittedAlphabet(Vec<CharRange>),
Pattern(String),
ContainedSubtype(Box<Type>),
InnerType(Box<SubtypeConstraint>),
Union(Vec<SubtypeConstraint>),
Intersection(Vec<SubtypeConstraint>),
Complement(Box<SubtypeConstraint>),
NamedBitList(Vec<NamedNumber>),
}Expand description
Subtype constraint (X.680 Section 51)
Variants§
SingleValue(ConstraintValue)
Single value: INTEGER (42)
ValueRange
Value range: INTEGER (0..100), INTEGER (MIN..100)
SizeConstraint(Box<SubtypeConstraint>)
Size constraint: OCTET STRING (SIZE (1..64))
PermittedAlphabet(Vec<CharRange>)
Permitted alphabet: IA5String (FROM (“A”..“Z”))
Pattern(String)
Pattern: IA5String (PATTERN “[0-9]+”)
ContainedSubtype(Box<Type>)
Contained subtype: OCTET STRING (CONTAINING INTEGER)
InnerType(Box<SubtypeConstraint>)
Inner type constraint: SEQUENCE OF INTEGER (1..100)
Union(Vec<SubtypeConstraint>)
Union: (constraint1 | constraint2)
Intersection(Vec<SubtypeConstraint>)
Intersection: (constraint1 ^ constraint2)
Complement(Box<SubtypeConstraint>)
Complement: ALL EXCEPT constraint
NamedBitList(Vec<NamedNumber>)
Named bit list for BIT STRING { flag(0), delegFlag(1), … }
Trait Implementations§
Source§impl Clone for SubtypeConstraint
impl Clone for SubtypeConstraint
Source§fn clone(&self) -> SubtypeConstraint
fn clone(&self) -> SubtypeConstraint
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 SubtypeConstraint
impl Debug for SubtypeConstraint
Source§impl PartialEq for SubtypeConstraint
impl PartialEq for SubtypeConstraint
impl StructuralPartialEq for SubtypeConstraint
Auto Trait Implementations§
impl Freeze for SubtypeConstraint
impl RefUnwindSafe for SubtypeConstraint
impl Send for SubtypeConstraint
impl Sync for SubtypeConstraint
impl Unpin for SubtypeConstraint
impl UnsafeUnpin for SubtypeConstraint
impl UnwindSafe for SubtypeConstraint
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