pub struct Schema { /* private fields */ }Implementations§
Source§impl Schema
impl Schema
pub const fn new_inferred( groups: HashMap<Group, GroupSchema>, ungrouped: GroupSchema, ) -> Self
pub const fn new_provided( groups: HashMap<Group, GroupSchema>, ungrouped: GroupSchema, ) -> Self
pub fn infer(graphrecord: &GraphRecord) -> Self
pub const fn groups(&self) -> &HashMap<Group, GroupSchema>
pub fn group(&self, group: &Group) -> Result<&GroupSchema, GraphError>
pub const fn ungrouped(&self) -> &GroupSchema
pub const fn schema_type(&self) -> &SchemaType
pub fn validate_node<'a>( &self, index: &'a NodeIndex, attributes: &'a Attributes, group: Option<&'a Group>, ) -> Result<(), GraphError>
pub fn validate_edge<'a>( &self, index: &'a EdgeIndex, attributes: &'a Attributes, group: Option<&'a Group>, ) -> Result<(), GraphError>
pub fn set_node_attribute( &mut self, attribute: &GraphRecordAttribute, data_type: DataType, attribute_type: AttributeType, group: Option<&Group>, ) -> Result<(), GraphError>
pub fn set_edge_attribute( &mut self, attribute: &GraphRecordAttribute, data_type: DataType, attribute_type: AttributeType, group: Option<&Group>, ) -> Result<(), GraphError>
pub fn update_node_attribute( &mut self, attribute: &GraphRecordAttribute, data_type: DataType, attribute_type: AttributeType, group: Option<&Group>, ) -> Result<(), GraphError>
pub fn update_edge_attribute( &mut self, attribute: &GraphRecordAttribute, data_type: DataType, attribute_type: AttributeType, group: Option<&Group>, ) -> Result<(), GraphError>
pub fn remove_node_attribute( &mut self, attribute: &GraphRecordAttribute, group: Option<&Group>, )
pub fn remove_edge_attribute( &mut self, attribute: &GraphRecordAttribute, group: Option<&Group>, )
pub fn add_group( &mut self, group: Group, schema: GroupSchema, ) -> Result<(), GraphError>
pub fn remove_group(&mut self, group: &Group)
pub const fn freeze(&mut self)
pub const fn unfreeze(&mut self)
Trait Implementations§
impl StructuralPartialEq for Schema
Auto Trait Implementations§
impl Freeze for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnsafeUnpin for Schema
impl UnwindSafe for Schema
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more