[−][src]Struct buttplug::client::device::ButtplugClientDevice
Fields
name: String
allowed_messages: MessageAttributesMap
Implementations
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<'_> From<(&'_ DeviceMessageInfo, Sender<(ButtplugSpecV2InMessage, Arc<Mutex<ButtplugFutureState<ButtplugSpecV2OutMessage>>>)>, Receiver<ButtplugClientDeviceEvent>)> for ButtplugClientDevice
[src]
fn from(
msg_sender_tuple: (&DeviceMessageInfo, Sender<ButtplugMessageFuturePair>, Receiver<ButtplugClientDeviceEvent>)
) -> Self
[src]
msg_sender_tuple: (&DeviceMessageInfo, Sender<ButtplugMessageFuturePair>, Receiver<ButtplugClientDeviceEvent>)
) -> Self
impl Send for ButtplugClientDevice
[src]
impl Sync for ButtplugClientDevice
[src]
Auto Trait Implementations
impl !RefUnwindSafe for ButtplugClientDevice
impl Unpin for ButtplugClientDevice
impl !UnwindSafe for ButtplugClientDevice
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T> GetTypeId for T where
T: Any,
[src]
T: Any,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,