Enum rasn_compiler::intermediate::constraints::Constraint
source · pub enum Constraint {
SubtypeConstraint(ElementSet),
TableConstraint(TableConstraint),
Parameter(Vec<Parameter>),
}
Variants§
Implementations§
source§impl Constraint
impl Constraint
sourcepub fn integer_constraints(&self) -> IntegerType
pub fn integer_constraints(&self) -> IntegerType
Returns the type of integer that should be used in a representation when applying the Constraint
§Example
pub fn unpack_as_value_range( &self ) -> Result<(&Option<ASN1Value>, &Option<ASN1Value>, bool), GrammarError>
pub fn unpack_as_strict_value(&self) -> Result<(&ASN1Value, bool), GrammarError>
Trait Implementations§
source§impl Clone for Constraint
impl Clone for Constraint
source§fn clone(&self) -> Constraint
fn clone(&self) -> Constraint
Returns a copy 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 Constraint
impl Debug for Constraint
source§impl From<Constraint> for SubtypeElement
impl From<Constraint> for SubtypeElement
source§fn from(value: Constraint) -> Self
fn from(value: Constraint) -> Self
Converts to this type from the input type.
source§impl PartialEq for Constraint
impl PartialEq for Constraint
source§fn eq(&self, other: &Constraint) -> bool
fn eq(&self, other: &Constraint) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<&Constraint> for PerVisibleRangeConstraints
impl TryFrom<&Constraint> for PerVisibleRangeConstraints
§type Error = GrammarError
type Error = GrammarError
The type returned in the event of a conversion error.
source§fn try_from(
value: &Constraint
) -> Result<PerVisibleRangeConstraints, Self::Error>
fn try_from( value: &Constraint ) -> Result<PerVisibleRangeConstraints, Self::Error>
Performs the conversion.
impl StructuralPartialEq for Constraint
Auto Trait Implementations§
impl RefUnwindSafe for Constraint
impl Send for Constraint
impl Sync for Constraint
impl Unpin for Constraint
impl UnwindSafe for Constraint
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