pub struct SqlConstraint { /* private fields */ }Expand description
SQL constraint metadata.
Implementations§
Source§impl SqlConstraint
impl SqlConstraint
Sourcepub const fn new(kind: SqlConstraintKind) -> Self
pub const fn new(kind: SqlConstraintKind) -> Self
Creates constraint metadata from a kind.
Sourcepub fn with_name(self, name: SqlConstraintName) -> Self
pub fn with_name(self, name: SqlConstraintName) -> Self
Adds a constraint name.
Sourcepub const fn kind(&self) -> SqlConstraintKind
pub const fn kind(&self) -> SqlConstraintKind
Returns the constraint kind.
Sourcepub const fn name(&self) -> Option<&SqlConstraintName>
pub const fn name(&self) -> Option<&SqlConstraintName>
Returns the optional constraint name.
Trait Implementations§
Source§impl Clone for SqlConstraint
impl Clone for SqlConstraint
Source§fn clone(&self) -> SqlConstraint
fn clone(&self) -> SqlConstraint
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 SqlConstraint
impl Debug for SqlConstraint
Source§impl Display for SqlConstraint
impl Display for SqlConstraint
Source§impl Hash for SqlConstraint
impl Hash for SqlConstraint
Source§impl Ord for SqlConstraint
impl Ord for SqlConstraint
Source§fn cmp(&self, other: &SqlConstraint) -> Ordering
fn cmp(&self, other: &SqlConstraint) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SqlConstraint
impl PartialEq for SqlConstraint
Source§fn eq(&self, other: &SqlConstraint) -> bool
fn eq(&self, other: &SqlConstraint) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SqlConstraint
impl PartialOrd for SqlConstraint
impl Eq for SqlConstraint
impl StructuralPartialEq for SqlConstraint
Auto Trait Implementations§
impl Freeze for SqlConstraint
impl RefUnwindSafe for SqlConstraint
impl Send for SqlConstraint
impl Sync for SqlConstraint
impl Unpin for SqlConstraint
impl UnsafeUnpin for SqlConstraint
impl UnwindSafe for SqlConstraint
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