Struct buttplug::core::message::VibrateCmd
source · pub struct VibrateCmd { /* private fields */ }Implementations§
source§impl VibrateCmd
impl VibrateCmd
pub fn speeds(&self) -> &Vec<VibrateSubcommand>
source§impl VibrateCmd
impl VibrateCmd
pub fn new(device_index: u32, speeds: Vec<VibrateSubcommand>) -> Self
Trait Implementations§
source§impl ButtplugDeviceMessage for VibrateCmd
impl ButtplugDeviceMessage for VibrateCmd
fn device_index(&self) -> u32
fn set_device_index(&mut self, id: u32)
source§impl ButtplugMessage for VibrateCmd
impl ButtplugMessage for VibrateCmd
source§impl ButtplugMessageValidator for VibrateCmd
impl ButtplugMessageValidator for VibrateCmd
source§fn is_valid(&self) -> Result<(), ButtplugMessageError>
fn is_valid(&self) -> Result<(), ButtplugMessageError>
Returns () if the message is valid, otherwise returns a message error.
fn is_system_id(&self, id: u32) -> Result<(), ButtplugMessageError>
fn is_not_system_id(&self, id: u32) -> Result<(), ButtplugMessageError>
fn is_in_command_range( &self, value: f64, error_msg: String ) -> Result<(), ButtplugMessageError>
source§impl Clone for VibrateCmd
impl Clone for VibrateCmd
source§fn clone(&self) -> VibrateCmd
fn clone(&self) -> VibrateCmd
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for VibrateCmd
impl Debug for VibrateCmd
source§impl Default for VibrateCmd
impl Default for VibrateCmd
source§fn default() -> VibrateCmd
fn default() -> VibrateCmd
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for VibrateCmd
impl<'de> Deserialize<'de> for VibrateCmd
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<VibrateCmd> for ButtplugClientMessage
impl From<VibrateCmd> for ButtplugClientMessage
source§fn from(msg: VibrateCmd) -> ButtplugClientMessage
fn from(msg: VibrateCmd) -> ButtplugClientMessage
Converts to this type from the input type.
source§impl From<VibrateCmd> for ButtplugDeviceCommandMessageUnion
impl From<VibrateCmd> for ButtplugDeviceCommandMessageUnion
source§fn from(msg: VibrateCmd) -> ButtplugDeviceCommandMessageUnion
fn from(msg: VibrateCmd) -> ButtplugDeviceCommandMessageUnion
Converts to this type from the input type.
source§impl From<VibrateCmd> for ButtplugSpecV2ClientMessage
impl From<VibrateCmd> for ButtplugSpecV2ClientMessage
source§fn from(msg: VibrateCmd) -> ButtplugSpecV2ClientMessage
fn from(msg: VibrateCmd) -> ButtplugSpecV2ClientMessage
Converts to this type from the input type.
source§impl From<VibrateCmd> for ButtplugSpecV3ClientMessage
impl From<VibrateCmd> for ButtplugSpecV3ClientMessage
source§fn from(msg: VibrateCmd) -> ButtplugSpecV3ClientMessage
fn from(msg: VibrateCmd) -> ButtplugSpecV3ClientMessage
Converts to this type from the input type.
source§impl From<VibrateCmd> for ScalarCmd
impl From<VibrateCmd> for ScalarCmd
source§fn from(vibrate_cmd: VibrateCmd) -> Self
fn from(vibrate_cmd: VibrateCmd) -> Self
Converts to this type from the input type.
source§impl PartialEq for VibrateCmd
impl PartialEq for VibrateCmd
source§fn eq(&self, other: &VibrateCmd) -> bool
fn eq(&self, other: &VibrateCmd) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for VibrateCmd
impl Serialize for VibrateCmd
impl StructuralPartialEq for VibrateCmd
Auto Trait Implementations§
impl Freeze for VibrateCmd
impl RefUnwindSafe for VibrateCmd
impl Send for VibrateCmd
impl Sync for VibrateCmd
impl Unpin for VibrateCmd
impl UnwindSafe for VibrateCmd
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more