pub struct ConstraintMetadata { /* private fields */ }Expand description
Constraint metadata.
Implementations§
Source§impl ConstraintMetadata
impl ConstraintMetadata
Sourcepub const fn new(
reference: ConstraintRef,
kind: ConstraintKind,
) -> ConstraintMetadata
pub const fn new( reference: ConstraintRef, kind: ConstraintKind, ) -> ConstraintMetadata
Creates constraint metadata.
Sourcepub fn with_check(self, check: CheckExpressionLabel) -> ConstraintMetadata
pub fn with_check(self, check: CheckExpressionLabel) -> ConstraintMetadata
Adds a check expression label.
Sourcepub const fn with_status(self, status: ConstraintStatus) -> ConstraintMetadata
pub const fn with_status(self, status: ConstraintStatus) -> ConstraintMetadata
Sets constraint status.
Sourcepub const fn with_deferrability(
self,
deferrability: Deferrability,
) -> ConstraintMetadata
pub const fn with_deferrability( self, deferrability: Deferrability, ) -> ConstraintMetadata
Sets deferrability metadata.
Sourcepub const fn kind(&self) -> ConstraintKind
pub const fn kind(&self) -> ConstraintKind
Returns the constraint kind.
Sourcepub const fn check(&self) -> Option<&CheckExpressionLabel>
pub const fn check(&self) -> Option<&CheckExpressionLabel>
Returns the check expression label.
Trait Implementations§
Source§impl Clone for ConstraintMetadata
impl Clone for ConstraintMetadata
Source§fn clone(&self) -> ConstraintMetadata
fn clone(&self) -> ConstraintMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ConstraintMetadata
impl Debug for ConstraintMetadata
Source§impl PartialEq for ConstraintMetadata
impl PartialEq for ConstraintMetadata
Source§fn eq(&self, other: &ConstraintMetadata) -> bool
fn eq(&self, other: &ConstraintMetadata) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ConstraintMetadata
impl StructuralPartialEq for ConstraintMetadata
Auto Trait Implementations§
impl Freeze for ConstraintMetadata
impl RefUnwindSafe for ConstraintMetadata
impl Send for ConstraintMetadata
impl Sync for ConstraintMetadata
impl Unpin for ConstraintMetadata
impl UnsafeUnpin for ConstraintMetadata
impl UnwindSafe for ConstraintMetadata
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