Struct exile::Namespace[][src]

pub struct Namespace { /* fields omitted */ }

An XML namespace is defined by a URI and has a local name to serve as an alias. If the namespace is declared without a local name, then it serves as a default namespace.

Implementations

impl Namespace[src]

pub fn new<S1, S2>(uri: S1, local: S2) -> Result<Self, NsErr> where
    S1: Into<String>,
    S2: Into<String>, 
[src]

Create a new Namespace object. uri is not constrained, but local must be a valid NcName.

pub fn new_default<S>(uri: S) -> Result<Self, NsErr> where
    S: Into<String>, 
[src]

Create a new Namespace object that serves as a default namespace. uri is not constrained.

pub fn uri(&self) -> &str[src]

Get the URI.

pub fn local(&self) -> Option<&str>[src]

Get the local alias.

Trait Implementations

impl Clone for Namespace[src]

impl Debug for Namespace[src]

impl Default for Namespace[src]

impl Eq for Namespace[src]

impl Hash for Namespace[src]

impl Ord for Namespace[src]

impl PartialEq<Namespace> for Namespace[src]

impl PartialOrd<Namespace> for Namespace[src]

impl StructuralEq for Namespace[src]

impl StructuralPartialEq for Namespace[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.