Struct entity::EdgeDefinition[][src]

pub struct EdgeDefinition { /* fields omitted */ }

Represents a definition of an edge, which is comprised of its name, type of edge value, and the edge’s deletion policy

Implementations

impl EdgeDefinition[src]

pub fn new<N: Into<String>, T: Into<EdgeValueType>>(name: N, type: T) -> Self[src]

Creates a new definition for an edge with the given name, type of value, and deletion policy of nothing

pub fn new_with_deletion_policy<N: Into<String>, T: Into<EdgeValueType>>(
    name: N,
    type: T,
    deletion_policy: EdgeDeletionPolicy
) -> Self
[src]

Creates a new definition for an edge with the given name, type of value, and deletion policy

pub fn name(&self) -> &str[src]

The name of the edge tied to the definition

pub fn type(&self) -> &EdgeValueType[src]

The type of value of the edge tied to the definition

pub fn deletion_policy(&self) -> EdgeDeletionPolicy[src]

Returns the deletion policy of the edge tied to the definition

pub fn has_no_deletion_policy(&self) -> bool[src]

Returns true if the deletion policy is nothing

pub fn has_shallow_deletion_policy(&self) -> bool[src]

Returns true if the deletion policy is shallow

pub fn has_deep_deletion_policy(&self) -> bool[src]

Returns true if the deletion policy is deep

Trait Implementations

impl Clone for EdgeDefinition[src]

impl Debug for EdgeDefinition[src]

impl Eq for EdgeDefinition[src]

impl<'a> From<&'a Edge> for EdgeDefinition[src]

impl From<Edge> for EdgeDefinition[src]

impl PartialEq<EdgeDefinition> for EdgeDefinition[src]

impl StructuralEq for EdgeDefinition[src]

impl StructuralPartialEq for EdgeDefinition[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.