pub enum ButtplugServerMessageV4 {
Ok(OkV0),
Error(ErrorV0),
ServerInfo(ServerInfoV2),
DeviceList(DeviceListV4),
DeviceAdded(DeviceAddedV4),
DeviceRemoved(DeviceRemovedV0),
ScanningFinished(ScanningFinishedV0),
RawReading(RawReadingV2),
SensorReading(SensorReadingV4),
}Expand description
Represents all server-to-client messages in v3 of the Buttplug Spec
Variants§
Ok(OkV0)
Error(ErrorV0)
ServerInfo(ServerInfoV2)
DeviceList(DeviceListV4)
DeviceAdded(DeviceAddedV4)
DeviceRemoved(DeviceRemovedV0)
ScanningFinished(ScanningFinishedV0)
RawReading(RawReadingV2)
SensorReading(SensorReadingV4)
Trait Implementations§
Source§impl ButtplugMessageValidator for ButtplugServerMessageV4
impl ButtplugMessageValidator for ButtplugServerMessageV4
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 ButtplugServerMessageV4
impl Clone for ButtplugServerMessageV4
Source§fn clone(&self) -> ButtplugServerMessageV4
fn clone(&self) -> ButtplugServerMessageV4
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 ButtplugServerMessageV4
impl Debug for ButtplugServerMessageV4
Source§impl<'de> Deserialize<'de> for ButtplugServerMessageV4
impl<'de> Deserialize<'de> for ButtplugServerMessageV4
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<ButtplugServerDeviceMessage> for ButtplugServerMessageV4
impl From<ButtplugServerDeviceMessage> for ButtplugServerMessageV4
Source§fn from(other: ButtplugServerDeviceMessage) -> Self
fn from(other: ButtplugServerDeviceMessage) -> Self
Converts to this type from the input type.
Source§impl From<ButtplugServerMessageV4> for ButtplugServerMessageVariant
impl From<ButtplugServerMessageV4> for ButtplugServerMessageVariant
Source§fn from(value: ButtplugServerMessageV4) -> Self
fn from(value: ButtplugServerMessageV4) -> Self
Converts to this type from the input type.
Source§impl From<DeviceAddedV4> for ButtplugServerMessageV4
impl From<DeviceAddedV4> for ButtplugServerMessageV4
Source§fn from(msg: DeviceAddedV4) -> ButtplugServerMessageV4
fn from(msg: DeviceAddedV4) -> ButtplugServerMessageV4
Converts to this type from the input type.
Source§impl From<DeviceListV4> for ButtplugServerMessageV4
impl From<DeviceListV4> for ButtplugServerMessageV4
Source§fn from(msg: DeviceListV4) -> ButtplugServerMessageV4
fn from(msg: DeviceListV4) -> ButtplugServerMessageV4
Converts to this type from the input type.
Source§impl From<DeviceRemovedV0> for ButtplugServerMessageV4
impl From<DeviceRemovedV0> for ButtplugServerMessageV4
Source§fn from(msg: DeviceRemovedV0) -> ButtplugServerMessageV4
fn from(msg: DeviceRemovedV0) -> ButtplugServerMessageV4
Converts to this type from the input type.
Source§impl From<ErrorV0> for ButtplugServerMessageV4
impl From<ErrorV0> for ButtplugServerMessageV4
Source§fn from(msg: ErrorV0) -> ButtplugServerMessageV4
fn from(msg: ErrorV0) -> ButtplugServerMessageV4
Converts to this type from the input type.
Source§impl From<OkV0> for ButtplugServerMessageV4
impl From<OkV0> for ButtplugServerMessageV4
Source§fn from(msg: OkV0) -> ButtplugServerMessageV4
fn from(msg: OkV0) -> ButtplugServerMessageV4
Converts to this type from the input type.
Source§impl From<RawReadingV2> for ButtplugServerMessageV4
impl From<RawReadingV2> for ButtplugServerMessageV4
Source§fn from(msg: RawReadingV2) -> ButtplugServerMessageV4
fn from(msg: RawReadingV2) -> ButtplugServerMessageV4
Converts to this type from the input type.
Source§impl From<ScanningFinishedV0> for ButtplugServerMessageV4
impl From<ScanningFinishedV0> for ButtplugServerMessageV4
Source§fn from(msg: ScanningFinishedV0) -> ButtplugServerMessageV4
fn from(msg: ScanningFinishedV0) -> ButtplugServerMessageV4
Converts to this type from the input type.
Source§impl From<SensorReadingV4> for ButtplugServerMessageV4
impl From<SensorReadingV4> for ButtplugServerMessageV4
Source§fn from(msg: SensorReadingV4) -> ButtplugServerMessageV4
fn from(msg: SensorReadingV4) -> ButtplugServerMessageV4
Converts to this type from the input type.
Source§impl From<ServerInfoV2> for ButtplugServerMessageV4
impl From<ServerInfoV2> for ButtplugServerMessageV4
Source§fn from(msg: ServerInfoV2) -> ButtplugServerMessageV4
fn from(msg: ServerInfoV2) -> ButtplugServerMessageV4
Converts to this type from the input type.
Source§impl PartialEq for ButtplugServerMessageV4
impl PartialEq for ButtplugServerMessageV4
Source§impl Serialize for ButtplugServerMessageV4
impl Serialize for ButtplugServerMessageV4
Source§impl TryFrom<ButtplugServerMessageV4> for ButtplugServerMessageV3
impl TryFrom<ButtplugServerMessageV4> for ButtplugServerMessageV3
Source§type Error = ButtplugMessageError
type Error = ButtplugMessageError
The type returned in the event of a conversion error.
Source§fn try_from(
value: ButtplugServerMessageV4,
) -> Result<Self, <ButtplugServerMessageV3 as TryFrom<ButtplugServerMessageV4>>::Error>
fn try_from( value: ButtplugServerMessageV4, ) -> Result<Self, <ButtplugServerMessageV3 as TryFrom<ButtplugServerMessageV4>>::Error>
Performs the conversion.
impl StructuralPartialEq for ButtplugServerMessageV4
Auto Trait Implementations§
impl Freeze for ButtplugServerMessageV4
impl RefUnwindSafe for ButtplugServerMessageV4
impl Send for ButtplugServerMessageV4
impl Sync for ButtplugServerMessageV4
impl Unpin for ButtplugServerMessageV4
impl UnwindSafe for ButtplugServerMessageV4
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