Skip to main content

EdgeType

Struct EdgeType 

Source
pub struct EdgeType {
    pub name: String,
    /* private fields */
}
Expand description

Schema definition for an edge/relationship type

Fields§

§name: String

Implementations§

Source§

impl EdgeType

Source

pub fn new(name: impl Into<String>) -> Self

Source

pub fn from_node(self, node_type: impl Into<String>) -> Self

Source

pub fn to_node(self, node_type: impl Into<String>) -> Self

Source

pub fn field<V: FieldValidator + 'static>( self, name: impl Into<String>, validator: V, ) -> Self

Source

pub fn no_self_loop(self) -> Self

Source

pub fn unique(self) -> Self

Source

pub fn acyclic(self) -> Self

Source

pub fn bidirectional(self) -> Self

Source

pub fn cardinality(self, card: Cardinality) -> Self

Source

pub fn is_unique(&self) -> bool

Source

pub fn is_acyclic(&self) -> bool

Source

pub fn is_bidirectional(&self) -> bool

Source

pub fn cardinality_constraint(&self) -> Option<Cardinality>

Source

pub fn validate_edge(&self, edge: &Edge, graph: &ISONGraph) -> ValidationResult

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.