[−][src]Struct rupnp::Device
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.
pub fn deref(&self) -> &Self::Target
[src]
Auto Trait Implementations
impl RefUnwindSafe for Device
[src]
impl Send for Device
[src]
impl Sync for Device
[src]
impl Unpin for Device
[src]
impl UnwindSafe for Device
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,