[][src]Struct horned_owl::model::Build

pub struct 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]

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]

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]

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]

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]

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]

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]

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

impl Debug for Build[src]

impl Default for Build[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.