pub struct Constraint { /* private fields */ }
Implementations§
Source§impl Constraint
impl Constraint
Sourcepub fn new(
name: impl ToString,
local: Arc<Column>,
foreign: Arc<Column>,
) -> Self
pub fn new( name: impl ToString, local: Arc<Column>, foreign: Arc<Column>, ) -> Self
Create a new constraint with at least one local and foreign column pair
Sourcepub fn add_key_pair(
&mut self,
local: Arc<Column>,
foreign: Arc<Column>,
) -> &mut Constraint
pub fn add_key_pair( &mut self, local: Arc<Column>, foreign: Arc<Column>, ) -> &mut Constraint
Add a local/foreign column pair
Sourcepub fn key_pairs(&self) -> Iter<'_, ConstraintKeyPair>
pub fn key_pairs(&self) -> Iter<'_, ConstraintKeyPair>
Get column pairs iterator
Sourcepub fn key_pairs_count(&self) -> usize
pub fn key_pairs_count(&self) -> usize
Get number of pairs
Trait Implementations§
Source§impl Clone for Constraint
impl Clone for Constraint
Source§fn clone(&self) -> Constraint
fn clone(&self) -> Constraint
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 moreSource§impl Debug for Constraint
impl Debug for Constraint
Source§impl Default for Constraint
impl Default for Constraint
Source§fn default() -> Constraint
fn default() -> Constraint
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Constraint
impl<'de> Deserialize<'de> for Constraint
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Constraint
impl Serialize for Constraint
Source§impl WithMetadata for Constraint
impl WithMetadata for Constraint
Source§fn get_metadata_mut(&mut self) -> &mut HashMap<String, String>
fn get_metadata_mut(&mut self) -> &mut HashMap<String, String>
Borrow metadata container for writing
Source§fn set_meta(
&mut self,
meta_key: impl ToString,
meta_value: impl ToString,
) -> &mut Self
fn set_meta( &mut self, meta_key: impl ToString, meta_value: impl ToString, ) -> &mut Self
Set metadata key value pair
Source§fn set_meta_flag(&mut self, meta_flag: impl ToString) -> &mut Self
fn set_meta_flag(&mut self, meta_flag: impl ToString) -> &mut Self
Set metadata flag
Auto Trait Implementations§
impl Freeze for Constraint
impl RefUnwindSafe for Constraint
impl Send for Constraint
impl Sync for Constraint
impl Unpin for Constraint
impl UnwindSafe for Constraint
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more