[−][src]Struct buttplug::client::device::ButtplugClientDevice
Fields
name: String
allowed_messages: HashMap<String, MessageAttributes>
Methods
impl ButtplugClientDevice
[src]
pub async fn wait_for_event<'_>(
&'_ mut self
) -> Result<ButtplugClientDeviceEvent, ButtplugClientError>
[src]
&'_ mut self
) -> Result<ButtplugClientDeviceEvent, ButtplugClientError>
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]
&'_ mut self,
speed_cmd: VibrateCommand
) -> Result<(), ButtplugClientError>
pub async fn linear<'_>(
&'_ mut self,
linear_cmd: LinearCommand
) -> Result<(), ButtplugClientError>
[src]
&'_ mut self,
linear_cmd: LinearCommand
) -> Result<(), ButtplugClientError>
pub async fn rotate<'_>(
&'_ mut self,
rotate_cmd: RotateCommand
) -> Result<(), ButtplugClientError>
[src]
&'_ mut self,
rotate_cmd: RotateCommand
) -> Result<(), ButtplugClientError>
pub async fn stop<'_>(&'_ mut self) -> Result<(), ButtplugClientError>
[src]
Trait Implementations
impl Send for ButtplugClientDevice
[src]
impl Sync for ButtplugClientDevice
[src]
impl<'_> From<(&'_ DeviceAdded, Sender<(ButtplugMessageUnion, Arc<Mutex<ButtplugClientFutureState<ButtplugMessageUnion>>>)>, Receiver<ButtplugClientDeviceEvent>)> for ButtplugClientDevice
[src]
fn from(
msg_sender_tuple: (&DeviceAdded, Sender<ButtplugClientMessageFuturePair>, Receiver<ButtplugClientDeviceEvent>)
) -> Self
[src]
msg_sender_tuple: (&DeviceAdded, Sender<ButtplugClientMessageFuturePair>, Receiver<ButtplugClientDeviceEvent>)
) -> Self
impl<'_> From<(&'_ DeviceMessageInfo, Sender<(ButtplugMessageUnion, Arc<Mutex<ButtplugClientFutureState<ButtplugMessageUnion>>>)>, Receiver<ButtplugClientDeviceEvent>)> for ButtplugClientDevice
[src]
fn from(
msg_sender_tuple: (&DeviceMessageInfo, Sender<ButtplugClientMessageFuturePair>, Receiver<ButtplugClientDeviceEvent>)
) -> Self
[src]
msg_sender_tuple: (&DeviceMessageInfo, Sender<ButtplugClientMessageFuturePair>, Receiver<ButtplugClientDeviceEvent>)
) -> Self
Auto Trait Implementations
impl Unpin for ButtplugClientDevice
impl !UnwindSafe for ButtplugClientDevice
impl !RefUnwindSafe for ButtplugClientDevice
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,