Struct buttplug::core::message::SensorReadCmd
source · pub struct SensorReadCmd { /* private fields */ }Implementations§
source§impl SensorReadCmd
impl SensorReadCmd
pub fn sensor_index(&self) -> &u32
pub fn sensor_type(&self) -> &SensorType
source§impl SensorReadCmd
impl SensorReadCmd
pub fn new( device_index: u32, sensor_index: u32, sensor_type: SensorType ) -> Self
Trait Implementations§
source§impl ButtplugDeviceMessage for SensorReadCmd
impl ButtplugDeviceMessage for SensorReadCmd
fn device_index(&self) -> u32
fn set_device_index(&mut self, id: u32)
source§impl ButtplugMessage for SensorReadCmd
impl ButtplugMessage for SensorReadCmd
source§impl ButtplugMessageValidator for SensorReadCmd
impl ButtplugMessageValidator for SensorReadCmd
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 SensorReadCmd
impl Clone for SensorReadCmd
source§fn clone(&self) -> SensorReadCmd
fn clone(&self) -> SensorReadCmd
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 SensorReadCmd
impl Debug for SensorReadCmd
source§impl<'de> Deserialize<'de> for SensorReadCmd
impl<'de> Deserialize<'de> for SensorReadCmd
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<SensorReadCmd> for ButtplugClientMessage
impl From<SensorReadCmd> for ButtplugClientMessage
source§fn from(msg: SensorReadCmd) -> ButtplugClientMessage
fn from(msg: SensorReadCmd) -> ButtplugClientMessage
Converts to this type from the input type.
source§impl From<SensorReadCmd> for ButtplugDeviceCommandMessageUnion
impl From<SensorReadCmd> for ButtplugDeviceCommandMessageUnion
source§fn from(msg: SensorReadCmd) -> ButtplugDeviceCommandMessageUnion
fn from(msg: SensorReadCmd) -> ButtplugDeviceCommandMessageUnion
Converts to this type from the input type.
source§impl From<SensorReadCmd> for ButtplugSpecV3ClientMessage
impl From<SensorReadCmd> for ButtplugSpecV3ClientMessage
source§fn from(msg: SensorReadCmd) -> ButtplugSpecV3ClientMessage
fn from(msg: SensorReadCmd) -> ButtplugSpecV3ClientMessage
Converts to this type from the input type.
source§impl PartialEq for SensorReadCmd
impl PartialEq for SensorReadCmd
source§fn eq(&self, other: &SensorReadCmd) -> bool
fn eq(&self, other: &SensorReadCmd) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for SensorReadCmd
impl Serialize for SensorReadCmd
impl Eq for SensorReadCmd
impl StructuralEq for SensorReadCmd
impl StructuralPartialEq for SensorReadCmd
Auto Trait Implementations§
impl RefUnwindSafe for SensorReadCmd
impl Send for SensorReadCmd
impl Sync for SensorReadCmd
impl Unpin for SensorReadCmd
impl UnwindSafe for SensorReadCmd
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.