pub struct Relationship { /* private fields */ }Expand description
Relationship metadata.
Implementations§
Source§impl Relationship
impl Relationship
Sourcepub const fn new(
reference: RelationRef,
kind: RelationKind,
cardinality: Cardinality,
) -> Relationship
pub const fn new( reference: RelationRef, kind: RelationKind, cardinality: Cardinality, ) -> Relationship
Creates relationship metadata.
Sourcepub fn with_endpoints(self, endpoints: Vec<RelationEndpoint>) -> Relationship
pub fn with_endpoints(self, endpoints: Vec<RelationEndpoint>) -> Relationship
Sets relation endpoints.
Sourcepub const fn reference(&self) -> &RelationRef
pub const fn reference(&self) -> &RelationRef
Returns the relation reference.
Sourcepub const fn kind(&self) -> RelationKind
pub const fn kind(&self) -> RelationKind
Returns the relation kind.
Sourcepub const fn cardinality(&self) -> Cardinality
pub const fn cardinality(&self) -> Cardinality
Returns cardinality metadata.
Sourcepub fn endpoints(&self) -> &[RelationEndpoint]
pub fn endpoints(&self) -> &[RelationEndpoint]
Returns endpoints.
Trait Implementations§
Source§impl Clone for Relationship
impl Clone for Relationship
Source§fn clone(&self) -> Relationship
fn clone(&self) -> Relationship
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 Relationship
impl Debug for Relationship
Source§impl PartialEq for Relationship
impl PartialEq for Relationship
Source§fn eq(&self, other: &Relationship) -> bool
fn eq(&self, other: &Relationship) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for Relationship
impl StructuralPartialEq for Relationship
Auto Trait Implementations§
impl Freeze for Relationship
impl RefUnwindSafe for Relationship
impl Send for Relationship
impl Sync for Relationship
impl Unpin for Relationship
impl UnsafeUnpin for Relationship
impl UnwindSafe for Relationship
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