pub struct KeyProperties { /* private fields */ }Expand description
The object and data properties identifying instances in one HasKey axiom.
Either list can be empty; together they must contain at least one property. Object and data properties remain separate even if their IRIs coincide.
Implementations§
Source§impl KeyProperties
impl KeyProperties
Sourcepub fn try_new(
object_properties: Vec<ObjectPropertyExpression>,
data_properties: Vec<Iri<String>>,
) -> Result<Self, StructuralModelError>
pub fn try_new( object_properties: Vec<ObjectPropertyExpression>, data_properties: Vec<Iri<String>>, ) -> Result<Self, StructuralModelError>
Create key properties while preserving the two property categories.
§Errors
Returns StructuralModelError::InvalidFormat when both lists are empty.
Sourcepub fn object_properties(&self) -> &[ObjectPropertyExpression]
pub fn object_properties(&self) -> &[ObjectPropertyExpression]
Return the object property expressions.
Sourcepub fn data_properties(&self) -> &[Iri<String>]
pub fn data_properties(&self) -> &[Iri<String>]
Return the named data properties.
Trait Implementations§
Source§impl Clone for KeyProperties
impl Clone for KeyProperties
Source§impl Debug for KeyProperties
impl Debug for KeyProperties
Source§impl<'de> Deserialize<'de> for KeyProperties
impl<'de> Deserialize<'de> for KeyProperties
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
impl Eq for KeyProperties
Source§impl Hash for KeyProperties
impl Hash for KeyProperties
Source§impl PartialEq for KeyProperties
impl PartialEq for KeyProperties
Source§impl Serialize for KeyProperties
impl Serialize for KeyProperties
impl StructuralPartialEq for KeyProperties
Auto Trait Implementations§
impl Freeze for KeyProperties
impl RefUnwindSafe for KeyProperties
impl Send for KeyProperties
impl Sync for KeyProperties
impl Unpin for KeyProperties
impl UnsafeUnpin for KeyProperties
impl UnwindSafe for KeyProperties
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