pub struct EdgeDefinition { /* private fields */ }Expand description
Represents a definition of an edge, which is comprised of its name, type of edge value, and the edge’s deletion policy
Implementations§
Source§impl EdgeDefinition
impl EdgeDefinition
Sourcepub fn new<N: Into<String>, T: Into<EdgeValueType>>(name: N, type: T) -> Self
pub fn new<N: Into<String>, T: Into<EdgeValueType>>(name: N, type: T) -> Self
Creates a new definition for an edge with the given name, type of value, and deletion policy of nothing
Sourcepub fn new_with_deletion_policy<N: Into<String>, T: Into<EdgeValueType>>(
name: N,
type: T,
deletion_policy: EdgeDeletionPolicy,
) -> Self
pub fn new_with_deletion_policy<N: Into<String>, T: Into<EdgeValueType>>( name: N, type: T, deletion_policy: EdgeDeletionPolicy, ) -> Self
Creates a new definition for an edge with the given name, type of value, and deletion policy
Sourcepub fn type(&self) -> &EdgeValueType
pub fn type(&self) -> &EdgeValueType
The type of value of the edge tied to the definition
Sourcepub fn deletion_policy(&self) -> EdgeDeletionPolicy
pub fn deletion_policy(&self) -> EdgeDeletionPolicy
Returns the deletion policy of the edge tied to the definition
Sourcepub fn has_no_deletion_policy(&self) -> bool
pub fn has_no_deletion_policy(&self) -> bool
Returns true if the deletion policy is nothing
Sourcepub fn has_shallow_deletion_policy(&self) -> bool
pub fn has_shallow_deletion_policy(&self) -> bool
Returns true if the deletion policy is shallow
Sourcepub fn has_deep_deletion_policy(&self) -> bool
pub fn has_deep_deletion_policy(&self) -> bool
Returns true if the deletion policy is deep
Trait Implementations§
Source§impl Clone for EdgeDefinition
impl Clone for EdgeDefinition
Source§fn clone(&self) -> EdgeDefinition
fn clone(&self) -> EdgeDefinition
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 EdgeDefinition
impl Debug for EdgeDefinition
Source§impl<'a> From<&'a Edge> for EdgeDefinition
impl<'a> From<&'a Edge> for EdgeDefinition
Source§impl From<Edge> for EdgeDefinition
impl From<Edge> for EdgeDefinition
Source§impl PartialEq for EdgeDefinition
impl PartialEq for EdgeDefinition
impl Eq for EdgeDefinition
impl StructuralPartialEq for EdgeDefinition
Auto Trait Implementations§
impl Freeze for EdgeDefinition
impl RefUnwindSafe for EdgeDefinition
impl Send for EdgeDefinition
impl Sync for EdgeDefinition
impl Unpin for EdgeDefinition
impl UnwindSafe for EdgeDefinition
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