[][src]Struct rupnp::Device

pub struct Device { /* fields omitted */ }

A UPnP Device. It stores its Uri and a DeviceSpec, which contains information like the device type and its list of inner devices and services.

Implementations

impl Device[src]

pub fn url(&self) -> &Uri[src]

pub async fn from_url(url: Uri) -> Result<Self, Error>[src]

Creates a UPnP device from the given url. The url should point to the /device_description.xml or similar of the device. If you dont know the concrete location, use discover instead.

Methods from Deref<Target = DeviceSpec>

pub fn device_type(&self) -> &URN[src]

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

pub fn devices(&self) -> &Vec<DeviceSpec>[src]

Returns a list of this devices subdevices. Note that this does not recurse, if you want that behaviour use devices_iter instead.

pub fn services(&self) -> &Vec<Service>[src]

Returns a list of this devices services. Note that this does not recurse, if you want that behaviour use services_iter instead.

pub fn services_iter(&self) -> impl Iterator<Item = &Service>[src]

Returns an Iterator of all services that can be used from this device.

pub fn find_service(&self, service_type: &URN) -> Option<&Service>[src]

pub fn devices_iter(&self) -> impl Iterator<Item = &DeviceSpec>[src]

Returns an Iterator of all devices that can be used from this device.

pub fn find_device(&self, device_type: &URN) -> Option<&DeviceSpec>[src]

Trait Implementations

impl Clone for Device[src]

impl Debug for Device[src]

impl Deref for Device[src]

type Target = DeviceSpec

The resulting type after dereferencing.

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, 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.