pub struct BatteryLevelReadingV2 { /* private fields */ }Expand description
Battery level response
Implementations§
Source§impl BatteryLevelReadingV2
impl BatteryLevelReadingV2
pub fn battery_level(&self) -> f64
Trait Implementations§
Source§impl ButtplugDeviceMessage for BatteryLevelReadingV2
impl ButtplugDeviceMessage for BatteryLevelReadingV2
fn device_index(&self) -> u32
fn set_device_index(&mut self, id: u32)
Source§impl ButtplugMessageValidator for BatteryLevelReadingV2
impl ButtplugMessageValidator for BatteryLevelReadingV2
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 BatteryLevelReadingV2
impl Clone for BatteryLevelReadingV2
Source§fn clone(&self) -> BatteryLevelReadingV2
fn clone(&self) -> BatteryLevelReadingV2
Returns a duplicate 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 BatteryLevelReadingV2
impl Debug for BatteryLevelReadingV2
Source§impl<'de> Deserialize<'de> for BatteryLevelReadingV2
impl<'de> Deserialize<'de> for BatteryLevelReadingV2
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<BatteryLevelReadingV2> for ButtplugServerMessageV2
impl From<BatteryLevelReadingV2> for ButtplugServerMessageV2
Source§fn from(msg: BatteryLevelReadingV2) -> ButtplugServerMessageV2
fn from(msg: BatteryLevelReadingV2) -> ButtplugServerMessageV2
Converts to this type from the input type.
Source§impl PartialEq for BatteryLevelReadingV2
impl PartialEq for BatteryLevelReadingV2
Source§impl Serialize for BatteryLevelReadingV2
impl Serialize for BatteryLevelReadingV2
impl StructuralPartialEq for BatteryLevelReadingV2
Auto Trait Implementations§
impl Freeze for BatteryLevelReadingV2
impl RefUnwindSafe for BatteryLevelReadingV2
impl Send for BatteryLevelReadingV2
impl Sync for BatteryLevelReadingV2
impl Unpin for BatteryLevelReadingV2
impl UnwindSafe for BatteryLevelReadingV2
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