Struct spacetimedb_sats::db::def::ConstraintSchema
source · pub struct ConstraintSchema {
pub constraint_id: ConstraintId,
pub constraint_name: String,
pub constraints: Constraints,
pub table_id: TableId,
pub columns: ColList,
}
Expand description
A struct representing the schema of a database constraint.
This struct holds information about a database constraint, including its unique identifier, name, type (kind), the table it belongs to, and the columns it is associated with.
Fields§
§constraint_id: ConstraintId
§constraint_name: String
§constraints: Constraints
§table_id: TableId
§columns: ColList
Implementations§
source§impl ConstraintSchema
impl ConstraintSchema
sourcepub fn from_def(table_id: TableId, constraint: ConstraintDef) -> Self
pub fn from_def(table_id: TableId, constraint: ConstraintDef) -> Self
Constructs a ConstraintSchema
from a given ConstraintDef
and table identifier.
§Arguments
table_id
: Identifier of the table to which the constraint belongs.constraint
: TheConstraintDef
containing constraint information.
Trait Implementations§
source§impl Clone for ConstraintSchema
impl Clone for ConstraintSchema
source§fn clone(&self) -> ConstraintSchema
fn clone(&self) -> ConstraintSchema
Returns a copy 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 moresource§impl Debug for ConstraintSchema
impl Debug for ConstraintSchema
source§impl From<ConstraintSchema> for ConstraintDef
impl From<ConstraintSchema> for ConstraintDef
source§fn from(value: ConstraintSchema) -> Self
fn from(value: ConstraintSchema) -> Self
Converts to this type from the input type.
source§impl PartialEq for ConstraintSchema
impl PartialEq for ConstraintSchema
source§fn eq(&self, other: &ConstraintSchema) -> bool
fn eq(&self, other: &ConstraintSchema) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ConstraintSchema
impl StructuralPartialEq for ConstraintSchema
Auto Trait Implementations§
impl RefUnwindSafe for ConstraintSchema
impl Send for ConstraintSchema
impl Sync for ConstraintSchema
impl Unpin for ConstraintSchema
impl UnwindSafe for ConstraintSchema
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