[−][src]Struct horned_owl::model::Build
Build
creates new IRI
and NamedEntity
instances.
There is caching for performance. An IRI
or NamedEntity
with a
given IRI will use the same string in memory, if they have been
created with the same builder. Equality, ordering and hashing is
conserved across different Build
instances, so entities from
different instances can be combined within a single ontology
without consequences except for increased memory use.
Implementations
impl Build
[src]
pub fn new() -> Build
[src]
pub fn iri<S>(&self, s: S) -> IRI where
S: Into<String>,
[src]
S: Into<String>,
Constructs a new IRI
Examples
let b = Build::new(); let iri = b.iri("http://www.example.com"); assert_eq!("http://www.example.com", String::from(iri));
pub fn class<S>(&self, s: S) -> Class where
S: Into<String>,
[src]
S: Into<String>,
Constructs a new Class
.
Examples
let b = Build::new(); let c1 = b.class("http://www.example.com".to_string()); let c2 = b.class("http://www.example.com"); assert_eq!(c1, c2);
pub fn object_property<S>(&self, s: S) -> ObjectProperty where
S: Into<String>,
[src]
S: Into<String>,
Constructs a new ObjectProperty
.
Examples
let b = Build::new(); let obp1 = b.object_property("http://www.example.com".to_string()); let obp2 = b.object_property("http://www.example.com"); assert_eq!(obp1, obp2);
pub fn annotation_property<S>(&self, s: S) -> AnnotationProperty where
S: Into<String>,
[src]
S: Into<String>,
Constructs a new AnnotationProperty
.
Examples
let b = Build::new(); let anp1 = b.annotation_property("http://www.example.com".to_string()); let anp2 = b.annotation_property("http://www.example.com"); assert_eq!(anp1, anp2);
pub fn data_property<S>(&self, s: S) -> DataProperty where
S: Into<String>,
[src]
S: Into<String>,
Constructs a new DataProperty
.
Examples
let b = Build::new(); let dp1 = b.data_property("http://www.example.com".to_string()); let dp2 = b.data_property("http://www.example.com"); assert_eq!(dp1, dp2);
pub fn named_individual<S>(&self, s: S) -> NamedIndividual where
S: Into<String>,
[src]
S: Into<String>,
Constructs a new NamedIndividual
.
Examples
let b = Build::new(); let ni1 = b.named_individual("http://www.example.com".to_string()); let ni2 = b.named_individual("http://www.example.com"); assert_eq!(ni1, ni2);
pub fn datatype<S>(&self, s: S) -> Datatype where
S: Into<String>,
[src]
S: Into<String>,
Constructs a new Datatype
.
Examples
let b = Build::new(); let ni1 = b.datatype("http://www.example.com".to_string()); let ni2 = b.datatype("http://www.example.com"); assert_eq!(ni1, ni2);
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Build
impl !Send for Build
impl !Sync for Build
impl Unpin for Build
impl !UnwindSafe for Build
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,