Skip to main content

DeviceHost

Trait DeviceHost 

Source
pub trait DeviceHost {
    type Id: Copy + Eq;
    type Name: AsRef<str>;
    type Devices: AsRef<[Endpoint<Self::Id, Self::Name>]>;
    type Error;

    // Required method
    fn devices(&self) -> Result<Self::Devices, Self::Error>;
}
Expand description

Enumerate an owned snapshot on the control path. Snapshots can outlive a device.

Required Associated Types§

Source

type Id: Copy + Eq

Device identity, suitable for distinguishing duplicate display names.

Source

type Name: AsRef<str>

Display label.

Source

type Devices: AsRef<[Endpoint<Self::Id, Self::Name>]>

Storage chosen by the backend, such as a fixed array or a desktop catalog.

Source

type Error

Failure to obtain an inventory.

Required Methods§

Source

fn devices(&self) -> Result<Self::Devices, Self::Error>

Observe the currently available inputs and outputs.

§Errors

Returns backend enumeration errors.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§