pub struct GraphSchema {
pub nodes: Vec<NodeType>,
pub edges: Vec<EdgeType>,
}Fields§
§nodes: Vec<NodeType>§edges: Vec<EdgeType>Implementations§
Source§impl GraphSchema
impl GraphSchema
pub fn builder() -> GraphSchemaBuilder
pub fn node_type(&self, label: &Label) -> Option<&NodeType>
pub fn edge_type(&self, label: &Label) -> Option<&EdgeType>
pub fn validate_graph(&self, graph: &Graph) -> Result<()>
pub fn validate_node(&self, node: &Node) -> Result<()>
pub fn validate_edge(&self, edge: &Edge, graph: &Graph) -> Result<()>
Trait Implementations§
Source§impl Clone for GraphSchema
impl Clone for GraphSchema
Source§fn clone(&self) -> GraphSchema
fn clone(&self) -> GraphSchema
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 GraphSchema
impl Debug for GraphSchema
Source§impl Default for GraphSchema
impl Default for GraphSchema
Source§fn default() -> GraphSchema
fn default() -> GraphSchema
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GraphSchema
impl<'de> Deserialize<'de> for GraphSchema
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 PartialEq for GraphSchema
impl PartialEq for GraphSchema
Source§fn eq(&self, other: &GraphSchema) -> bool
fn eq(&self, other: &GraphSchema) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for GraphSchema
impl Serialize for GraphSchema
impl StructuralPartialEq for GraphSchema
Auto Trait Implementations§
impl Freeze for GraphSchema
impl RefUnwindSafe for GraphSchema
impl Send for GraphSchema
impl Sync for GraphSchema
impl Unpin for GraphSchema
impl UnsafeUnpin for GraphSchema
impl UnwindSafe for GraphSchema
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