pub struct CheckConstraint { /* private fields */ }Expand description
CheckConstraint
Named accepted-check declaration. The SQL spelling remains authored input until the compiler projection lowers it into the public source AST.
Implementations§
Source§impl CheckConstraint
impl CheckConstraint
Sourcepub const fn new(
name: &'static str,
check: &'static str,
expression: SourceExpressionResolver,
) -> Self
pub const fn new( name: &'static str, check: &'static str, expression: SourceExpressionResolver, ) -> Self
Construct one named accepted-check declaration.
Sourcepub fn source_expression(
&self,
schema: &Schema,
) -> Result<SourceCheckExpr, SchemaContractError>
pub fn source_expression( &self, schema: &Schema, ) -> Result<SourceCheckExpr, SchemaContractError>
Lower the compiler-validated expression into the public source AST.
§Errors
Returns a typed proposal error when an enum literal no longer resolves through the sealed graph or the expression violates public bounds.
Trait Implementations§
Source§impl Clone for CheckConstraint
impl Clone for CheckConstraint
Source§fn clone(&self) -> CheckConstraint
fn clone(&self) -> CheckConstraint
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 CheckConstraint
impl Debug for CheckConstraint
Auto Trait Implementations§
impl Freeze for CheckConstraint
impl RefUnwindSafe for CheckConstraint
impl Send for CheckConstraint
impl Sync for CheckConstraint
impl Unpin for CheckConstraint
impl UnsafeUnpin for CheckConstraint
impl UnwindSafe for CheckConstraint
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