[]Enum sonor::URN

pub enum URN {
    Device(Cow<'static, str>, Cow<'static, str>, u32),
    Service(Cow<'static, str>, Cow<'static, str>, u32),
}

Uniform Resource Name

e.g. urn:schemas-upnp-org:service:RenderingControl:1

Variants

Device(Cow<'static, str>, Cow<'static, str>, u32)
Service(Cow<'static, str>, Cow<'static, str>, u32)

Implementations

impl URN

pub const fn device(
    domain: &'static str,
    typ: &'static str,
    version: u32
) -> URN

Creates an instance of a device URN

pub const fn service(
    domain: &'static str,
    typ: &'static str,
    version: u32
) -> URN

Creates an instance of a service URN

pub fn domain_name(&self) -> &str

Extracts the schemas-upnp-org part of the urn:schemas-upnp-org:service:RenderingControl:1

pub fn typ(&self) -> &str

Extracts the RenderingControl part of the urn:schemas-upnp-org:service:RenderingControl:1

pub fn version(&self) -> u32

Extracts the 1 part of the urn:schemas-upnp-org:service:RenderingControl:1

Trait Implementations

impl Clone for URN

impl Debug for URN

impl Display for URN

impl Eq for URN

impl FromStr for URN

type Err = ParseURNError

The associated error which can be returned from parsing.

impl Into<SearchTarget> for URN

impl Ord for URN

impl PartialEq<URN> for URN

impl PartialOrd<URN> for URN

impl StructuralEq for URN

impl StructuralPartialEq for URN

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> Instrument 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> ToString for T where
    T: Display + ?Sized
[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.