pub struct Schema { /* private fields */ }Implementations§
Source§impl Schema
impl Schema
pub fn new_inferred( groups: HashMap<MedRecordAttribute, GroupSchema>, ungrouped: GroupSchema, ) -> Schema
pub fn new_provided( groups: HashMap<MedRecordAttribute, GroupSchema>, ungrouped: GroupSchema, ) -> Schema
pub fn infer(medrecord: &MedRecord) -> Schema
pub fn groups(&self) -> &HashMap<MedRecordAttribute, GroupSchema>
pub fn group( &self, group: &MedRecordAttribute, ) -> Result<&GroupSchema, GraphError>
pub fn ungrouped(&self) -> &GroupSchema
pub fn schema_type(&self) -> &SchemaType
pub fn validate_node<'a>( &self, index: &'a MedRecordAttribute, attributes: &'a HashMap<MedRecordAttribute, MedRecordValue>, group: Option<&'a MedRecordAttribute>, ) -> Result<(), GraphError>
pub fn validate_edge<'a>( &self, index: &'a u32, attributes: &'a HashMap<MedRecordAttribute, MedRecordValue>, group: Option<&'a MedRecordAttribute>, ) -> Result<(), GraphError>
pub fn set_node_attribute( &mut self, attribute: &MedRecordAttribute, data_type: DataType, attribute_type: AttributeType, group: Option<&MedRecordAttribute>, ) -> Result<(), GraphError>
pub fn set_edge_attribute( &mut self, attribute: &MedRecordAttribute, data_type: DataType, attribute_type: AttributeType, group: Option<&MedRecordAttribute>, ) -> Result<(), GraphError>
pub fn update_node_attribute( &mut self, attribute: &MedRecordAttribute, data_type: DataType, attribute_type: AttributeType, group: Option<&MedRecordAttribute>, ) -> Result<(), GraphError>
pub fn update_edge_attribute( &mut self, attribute: &MedRecordAttribute, data_type: DataType, attribute_type: AttributeType, group: Option<&MedRecordAttribute>, ) -> Result<(), GraphError>
pub fn remove_node_attribute( &mut self, attribute: &MedRecordAttribute, group: Option<&MedRecordAttribute>, )
pub fn remove_edge_attribute( &mut self, attribute: &MedRecordAttribute, group: Option<&MedRecordAttribute>, )
pub fn add_group( &mut self, group: MedRecordAttribute, schema: GroupSchema, ) -> Result<(), GraphError>
pub fn remove_group(&mut self, group: &MedRecordAttribute)
pub fn freeze(&mut self)
pub fn unfreeze(&mut self)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Schema
impl<'de> Deserialize<'de> for Schema
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Schema, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Schema, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Schema
impl Serialize for Schema
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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