pub struct CheckConstraint {
pub name: Option<Ident>,
pub expr: Box<Expr>,
pub enforced: Option<bool>,
}Expand description
A CHECK constraint ([ CONSTRAINT <name> ] CHECK (<expr>) [[NOT] ENFORCED]).
Fields§
§name: Option<Ident>Optional constraint name.
§expr: Box<Expr>The boolean expression the CHECK constraint enforces.
§enforced: Option<bool>MySQL-specific ENFORCED / NOT ENFORCED flag.
https://dev.mysql.com/doc/refman/8.4/en/create-table.html
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Source§impl Debug for CheckConstraint
impl Debug for CheckConstraint
Source§impl<'de> Deserialize<'de> for CheckConstraint
impl<'de> Deserialize<'de> for CheckConstraint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for CheckConstraint
impl Display for CheckConstraint
Source§impl From<CheckConstraint> for ColumnOption
impl From<CheckConstraint> for ColumnOption
Source§fn from(c: CheckConstraint) -> Self
fn from(c: CheckConstraint) -> Self
Converts to this type from the input type.
Source§impl From<CheckConstraint> for TableConstraint
impl From<CheckConstraint> for TableConstraint
Source§fn from(constraint: CheckConstraint) -> Self
fn from(constraint: CheckConstraint) -> Self
Converts to this type from the input type.
Source§impl Hash for CheckConstraint
impl Hash for CheckConstraint
Source§impl Ord for CheckConstraint
impl Ord for CheckConstraint
Source§fn cmp(&self, other: &CheckConstraint) -> Ordering
fn cmp(&self, other: &CheckConstraint) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
where Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CheckConstraint
impl PartialEq for CheckConstraint
Source§impl PartialOrd for CheckConstraint
impl PartialOrd for CheckConstraint
Source§fn partial_cmp(&self, other: &CheckConstraint) -> Option<Ordering>
fn partial_cmp(&self, other: &CheckConstraint) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§fn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
Tests less than or equal to (for self and other) and is used by the
<= operator. Read more
Source§impl Serialize for CheckConstraint
impl Serialize for CheckConstraint
Source§impl Spanned for CheckConstraint
impl Spanned for CheckConstraint
Source§impl Visit for CheckConstraint
impl Visit for CheckConstraint
Source§impl VisitMut for CheckConstraint
impl VisitMut for CheckConstraint
Source§fn visit<V: VisitorMut>(&mut self, visitor: &mut V) -> ControlFlow<V::Break>
fn visit<V: VisitorMut>(&mut self, visitor: &mut V) -> ControlFlow<V::Break>
Mutably visit this node with the provided VisitorMut. Read more
impl Eq for CheckConstraint
impl StructuralPartialEq 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 UnwindSafe for CheckConstraint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
where 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
where T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
where T: for<'de> Deserialize<'de>,