[][src]Enum xml_dom::level2::ext::namespaced::NamespacePrefix

pub enum NamespacePrefix {
    None,
    Default,
    Some(String),
}

This represents the prefix value as a result of either Namespaced::get_prefix or Namespaced::resolve_prefix.

Variants

None

No mapping was discovered.

Default

A mapping was discovered for the default (no-value) prefix.

Some(String)

A mapping was discovered for the named prefix.

Methods

impl NamespacePrefix[src]

pub fn new_some(prefix: &str) -> Self[src]

Construct a new NamespacePrefix::Some value with the provided prefix.

pub fn is_none(&self) -> bool[src]

Returns true of this is a NamespacePrefix::None value, otherwise false.

pub fn is_default(&self) -> bool[src]

Returns true of this is a NamespacePrefix::Default value, otherwise false.

pub fn is_some(&self) -> bool[src]

Returns true of this is a NamespacePrefix::Some value, otherwise false.

pub fn some(&self) -> Option<String>[src]

If this is a NamespacePrefix::Some value, return Some with the prefix string, otherwise None.

Trait Implementations

impl Clone for NamespacePrefix[src]

impl Debug for NamespacePrefix[src]

impl PartialEq<NamespacePrefix> for NamespacePrefix[src]

impl StructuralPartialEq for NamespacePrefix[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.