Skip to main content

Device

Trait Device 

Source
pub trait Device: DeviceBase {
    // Required methods
    fn uuid(&self) -> Uuid;
    fn list_methods(&self) -> Result<Vec<MethodInfo>, HlapiClientError>;
    fn event_stream(&self) -> EventStream<Self::Event>;
}
Expand description

HLAPI device trait

This trait contains helper methods common to all devices. It is automatically implemented for all wrappers, manually implementing it is not necessary or possible.

Required Methods§

Source

fn uuid(&self) -> Uuid

Gets the UUID of this device

Source

fn list_methods(&self) -> Result<Vec<MethodInfo>, HlapiClientError>

List the methods of the device

Source

fn event_stream(&self) -> EventStream<Self::Event>

Gets the stream of events from the device

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<T: DeviceBase> Device for T