Struct rdf::namespace::NamespaceStore [] [src]

pub struct NamespaceStore { /* fields omitted */ }

Storage for multiple namespaces.

Methods

impl NamespaceStore
[src]

[src]

Constructor for NamespaceStore.

Examples

use rdf::namespace::NamespaceStore;

let nss = NamespaceStore::new();

[src]

Returns the stored namespaces with prefixes.

[src]

Adds a new namespace.

Examples

use rdf::namespace::NamespaceStore;
use rdf::namespace::Namespace;
use rdf::uri::Uri;

let mut nss = NamespaceStore::new();

let ns = Namespace::new("example".to_string(),
                        Uri::new("http://example.org/".to_string()));

nss.add(&ns);

[src]

Returns the URI of a specific namespace.

Examples

use rdf::namespace::NamespaceStore;
use rdf::namespace::Namespace;
use rdf::uri::Uri;

let mut nss = NamespaceStore::new();

let ns = Namespace::new("example".to_string(),
                        Uri::new("http://example.org/".to_string()));

nss.add(&ns);

assert_eq!(nss.get_uri_by_prefix("example".to_string()).unwrap(),
           &Uri::new("http://example.org/".to_string()))

Trait Implementations

impl PartialEq for NamespaceStore
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Debug for NamespaceStore
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations