[][src]Struct buttplug::client::device::ButtplugClientDevice

pub struct ButtplugClientDevice {
    pub name: String,
    pub allowed_messages: MessageAttributesMap,
    // some fields omitted
}

Fields

name: Stringallowed_messages: MessageAttributesMap

Implementations

impl ButtplugClientDevice[src]

pub async fn wait_for_event<'_>(
    &'_ mut self
) -> Result<ButtplugClientDeviceEvent, ButtplugClientError>
[src]

Produces a future that will wait for a set of events from the internal loop. Returns once any number of events is received.

This should be called whenever the client isn't doing anything otherwise, so we can respond to unexpected updates from the server, such as devices connections/disconnections, log messages, etc... This is basically what event handlers in C# and JS would deal with, but we're in Rust so this requires us to be slightly more explicit.

pub async fn vibrate<'_>(
    &'_ mut self,
    speed_cmd: VibrateCommand
) -> Result<(), ButtplugClientError>
[src]

pub async fn linear<'_>(
    &'_ mut self,
    linear_cmd: LinearCommand
) -> Result<(), ButtplugClientError>
[src]

pub async fn rotate<'_>(
    &'_ mut self,
    rotate_cmd: RotateCommand
) -> Result<(), ButtplugClientError>
[src]

pub async fn stop<'_>(&'_ mut self) -> Result<(), ButtplugClientError>[src]

Trait Implementations

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> GetTypeId for T where
    T: Any
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,