pub struct ConstraintSet { /* private fields */ }Expand description
Composable constraint set with enforcement tiers.
Implementations§
Source§impl ConstraintSet
impl ConstraintSet
Sourcepub fn builder() -> ConstraintSetBuilder
pub fn builder() -> ConstraintSetBuilder
Create a new builder for constructing a constraint set.
Sourcepub fn verify(
&self,
root: NodeId,
ctx: &ConstraintContext<'_>,
) -> ConstraintVerification
pub fn verify( &self, root: NodeId, ctx: &ConstraintContext<'_>, ) -> ConstraintVerification
Verify all constraints against the given context, walking the tree recursively.
Returns hard violations as errors. Advisory violations are collected as warnings.
Sourcepub fn hard_constraints(&self) -> &[Box<dyn Constraint>]
pub fn hard_constraints(&self) -> &[Box<dyn Constraint>]
Get the hard constraints.
Sourcepub fn structural_constraints(&self) -> &[Box<dyn Constraint>]
pub fn structural_constraints(&self) -> &[Box<dyn Constraint>]
Get the structural constraints.
Sourcepub fn advisory_constraints(&self) -> &[Box<dyn Constraint>]
pub fn advisory_constraints(&self) -> &[Box<dyn Constraint>]
Get the advisory constraints.
Auto Trait Implementations§
impl !RefUnwindSafe for ConstraintSet
impl !UnwindSafe for ConstraintSet
impl Freeze for ConstraintSet
impl Send for ConstraintSet
impl Sync for ConstraintSet
impl Unpin for ConstraintSet
impl UnsafeUnpin for ConstraintSet
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