[][src]Trait buttplug::device::device::DeviceImpl

pub trait DeviceImpl: Sync + Send {
    fn name(&self) -> &str;
fn address(&self) -> &str;
fn connected(&self) -> bool;
fn endpoints(&self) -> Vec<Endpoint>;
#[must_use] fn disconnect<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn box_clone(&self) -> Box<dyn DeviceImpl>;
fn get_event_receiver(&self) -> BoundedDeviceEventBroadcaster;
#[must_use] fn read_value<'life0, 'async_trait>(
        &'life0 self,
        msg: DeviceReadCmd
    ) -> Pin<Box<dyn Future<Output = Result<RawReading, ButtplugError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn write_value<'life0, 'async_trait>(
        &'life0 self,
        msg: DeviceWriteCmd
    ) -> Pin<Box<dyn Future<Output = Result<(), ButtplugError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn subscribe<'life0, 'async_trait>(
        &'life0 self,
        msg: DeviceSubscribeCmd
    ) -> Pin<Box<dyn Future<Output = Result<(), ButtplugError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn unsubscribe<'life0, 'async_trait>(
        &'life0 self,
        msg: DeviceUnsubscribeCmd
    ) -> Pin<Box<dyn Future<Output = Result<(), ButtplugError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }

Required methods

fn name(&self) -> &str

fn address(&self) -> &str

fn connected(&self) -> bool

fn endpoints(&self) -> Vec<Endpoint>

#[must_use]fn disconnect<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

fn box_clone(&self) -> Box<dyn DeviceImpl>

fn get_event_receiver(&self) -> BoundedDeviceEventBroadcaster

#[must_use]fn read_value<'life0, 'async_trait>(
    &'life0 self,
    msg: DeviceReadCmd
) -> Pin<Box<dyn Future<Output = Result<RawReading, ButtplugError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn write_value<'life0, 'async_trait>(
    &'life0 self,
    msg: DeviceWriteCmd
) -> Pin<Box<dyn Future<Output = Result<(), ButtplugError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn subscribe<'life0, 'async_trait>(
    &'life0 self,
    msg: DeviceSubscribeCmd
) -> Pin<Box<dyn Future<Output = Result<(), ButtplugError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn unsubscribe<'life0, 'async_trait>(
    &'life0 self,
    msg: DeviceUnsubscribeCmd
) -> Pin<Box<dyn Future<Output = Result<(), ButtplugError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Loading content...

Implementors

impl DeviceImpl for TestDevice[src]

Loading content...