pub struct OntologyId { /* private fields */ }Expand description
OWL ontology identity: optional ontology IRI plus optional version IRI.
Implementations§
Source§impl OntologyId
impl OntologyId
Sourcepub fn versioned(ontology_iri: Iri<String>, version_iri: Iri<String>) -> Self
pub fn versioned(ontology_iri: Iri<String>, version_iri: Iri<String>) -> Self
Create a versioned ontology ID.
Sourcepub fn try_new(
ontology_iri: Option<Iri<String>>,
version_iri: Option<Iri<String>>,
) -> Result<Self, StructuralModelError>
pub fn try_new( ontology_iri: Option<Iri<String>>, version_iri: Option<Iri<String>>, ) -> Result<Self, StructuralModelError>
Create an ontology ID from optional identity fields.
§Errors
Returns StructuralModelError::InvalidFormat when a version IRI is
supplied without an ontology IRI.
Sourcepub fn ontology_iri(&self) -> Option<&Iri<String>>
pub fn ontology_iri(&self) -> Option<&Iri<String>>
Return the ontology IRI when present.
Sourcepub fn version_iri(&self) -> Option<&Iri<String>>
pub fn version_iri(&self) -> Option<&Iri<String>>
Return the version IRI when present.
Sourcepub fn is_anonymous(&self) -> bool
pub fn is_anonymous(&self) -> bool
Return whether this ID has no ontology IRI.
Trait Implementations§
Source§impl Clone for OntologyId
impl Clone for OntologyId
Source§impl Debug for OntologyId
impl Debug for OntologyId
Source§impl<'de> Deserialize<'de> for OntologyId
impl<'de> Deserialize<'de> for OntologyId
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 Display for OntologyId
impl Display for OntologyId
impl Eq for OntologyId
Source§impl Hash for OntologyId
impl Hash for OntologyId
Source§impl PartialEq for OntologyId
impl PartialEq for OntologyId
Source§impl Serialize for OntologyId
impl Serialize for OntologyId
impl StructuralPartialEq for OntologyId
Auto Trait Implementations§
impl Freeze for OntologyId
impl RefUnwindSafe for OntologyId
impl Send for OntologyId
impl Sync for OntologyId
impl Unpin for OntologyId
impl UnsafeUnpin for OntologyId
impl UnwindSafe for OntologyId
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