Enum buttplug::core::message::ButtplugServerMessage
source · pub enum ButtplugServerMessage {
Show 13 variants
Ok(Ok),
Error(Error),
Test(Test),
Log(Log),
ServerInfo(ServerInfo),
DeviceList(DeviceList),
DeviceAdded(DeviceAdded),
DeviceRemoved(DeviceRemoved),
ScanningFinished(ScanningFinished),
RawReading(RawReading),
SensorReading(SensorReading),
BatteryLevelReading(BatteryLevelReading),
RSSILevelReading(RSSILevelReading),
}
Expand description
Represents all possible messages a ButtplugServer can send to a ButtplugClient.
Variants§
Ok(Ok)
Error(Error)
Test(Test)
Log(Log)
ServerInfo(ServerInfo)
DeviceList(DeviceList)
DeviceAdded(DeviceAdded)
DeviceRemoved(DeviceRemoved)
ScanningFinished(ScanningFinished)
RawReading(RawReading)
SensorReading(SensorReading)
BatteryLevelReading(BatteryLevelReading)
RSSILevelReading(RSSILevelReading)
Trait Implementations§
source§impl ButtplugMessageValidator for ButtplugServerMessage
impl ButtplugMessageValidator for ButtplugServerMessage
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 ButtplugServerMessage
impl Clone for ButtplugServerMessage
source§fn clone(&self) -> ButtplugServerMessage
fn clone(&self) -> ButtplugServerMessage
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 ButtplugServerMessage
impl Debug for ButtplugServerMessage
source§impl From<BatteryLevelReading> for ButtplugServerMessage
impl From<BatteryLevelReading> for ButtplugServerMessage
source§fn from(msg: BatteryLevelReading) -> ButtplugServerMessage
fn from(msg: BatteryLevelReading) -> ButtplugServerMessage
Converts to this type from the input type.
source§impl From<ButtplugServerDeviceMessage> for ButtplugServerMessage
impl From<ButtplugServerDeviceMessage> for ButtplugServerMessage
source§fn from(other: ButtplugServerDeviceMessage) -> Self
fn from(other: ButtplugServerDeviceMessage) -> Self
Converts to this type from the input type.
source§impl From<DeviceAdded> for ButtplugServerMessage
impl From<DeviceAdded> for ButtplugServerMessage
source§fn from(msg: DeviceAdded) -> ButtplugServerMessage
fn from(msg: DeviceAdded) -> ButtplugServerMessage
Converts to this type from the input type.
source§impl From<DeviceList> for ButtplugServerMessage
impl From<DeviceList> for ButtplugServerMessage
source§fn from(msg: DeviceList) -> ButtplugServerMessage
fn from(msg: DeviceList) -> ButtplugServerMessage
Converts to this type from the input type.
source§impl From<DeviceRemoved> for ButtplugServerMessage
impl From<DeviceRemoved> for ButtplugServerMessage
source§fn from(msg: DeviceRemoved) -> ButtplugServerMessage
fn from(msg: DeviceRemoved) -> ButtplugServerMessage
Converts to this type from the input type.
source§impl From<Error> for ButtplugServerMessage
impl From<Error> for ButtplugServerMessage
source§fn from(msg: Error) -> ButtplugServerMessage
fn from(msg: Error) -> ButtplugServerMessage
Converts to this type from the input type.
source§impl From<Log> for ButtplugServerMessage
impl From<Log> for ButtplugServerMessage
source§fn from(msg: Log) -> ButtplugServerMessage
fn from(msg: Log) -> ButtplugServerMessage
Converts to this type from the input type.
source§impl From<Ok> for ButtplugServerMessage
impl From<Ok> for ButtplugServerMessage
source§fn from(msg: Ok) -> ButtplugServerMessage
fn from(msg: Ok) -> ButtplugServerMessage
Converts to this type from the input type.
source§impl From<RSSILevelReading> for ButtplugServerMessage
impl From<RSSILevelReading> for ButtplugServerMessage
source§fn from(msg: RSSILevelReading) -> ButtplugServerMessage
fn from(msg: RSSILevelReading) -> ButtplugServerMessage
Converts to this type from the input type.
source§impl From<RawReading> for ButtplugServerMessage
impl From<RawReading> for ButtplugServerMessage
source§fn from(msg: RawReading) -> ButtplugServerMessage
fn from(msg: RawReading) -> ButtplugServerMessage
Converts to this type from the input type.
source§impl From<ScanningFinished> for ButtplugServerMessage
impl From<ScanningFinished> for ButtplugServerMessage
source§fn from(msg: ScanningFinished) -> ButtplugServerMessage
fn from(msg: ScanningFinished) -> ButtplugServerMessage
Converts to this type from the input type.
source§impl From<SensorReading> for ButtplugServerMessage
impl From<SensorReading> for ButtplugServerMessage
source§fn from(msg: SensorReading) -> ButtplugServerMessage
fn from(msg: SensorReading) -> ButtplugServerMessage
Converts to this type from the input type.
source§impl From<ServerInfo> for ButtplugServerMessage
impl From<ServerInfo> for ButtplugServerMessage
source§fn from(msg: ServerInfo) -> ButtplugServerMessage
fn from(msg: ServerInfo) -> ButtplugServerMessage
Converts to this type from the input type.
source§impl From<Test> for ButtplugServerMessage
impl From<Test> for ButtplugServerMessage
source§fn from(msg: Test) -> ButtplugServerMessage
fn from(msg: Test) -> ButtplugServerMessage
Converts to this type from the input type.
source§impl PartialEq for ButtplugServerMessage
impl PartialEq for ButtplugServerMessage
source§fn eq(&self, other: &ButtplugServerMessage) -> bool
fn eq(&self, other: &ButtplugServerMessage) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<ButtplugServerMessage> for ButtplugSpecV0ServerMessage
impl TryFrom<ButtplugServerMessage> for ButtplugSpecV0ServerMessage
§type Error = ButtplugMessageError
type Error = ButtplugMessageError
The type returned in the event of a conversion error.
source§fn try_from(msg: ButtplugServerMessage) -> Result<Self, ButtplugMessageError>
fn try_from(msg: ButtplugServerMessage) -> Result<Self, ButtplugMessageError>
Performs the conversion.
source§impl TryFrom<ButtplugServerMessage> for ButtplugSpecV1ServerMessage
impl TryFrom<ButtplugServerMessage> for ButtplugSpecV1ServerMessage
§type Error = ButtplugMessageError
type Error = ButtplugMessageError
The type returned in the event of a conversion error.
source§fn try_from(msg: ButtplugServerMessage) -> Result<Self, ButtplugMessageError>
fn try_from(msg: ButtplugServerMessage) -> Result<Self, ButtplugMessageError>
Performs the conversion.
source§impl TryFrom<ButtplugServerMessage> for ButtplugSpecV2ServerMessage
impl TryFrom<ButtplugServerMessage> for ButtplugSpecV2ServerMessage
§type Error = ButtplugMessageError
type Error = ButtplugMessageError
The type returned in the event of a conversion error.
source§fn try_from(msg: ButtplugServerMessage) -> Result<Self, ButtplugMessageError>
fn try_from(msg: ButtplugServerMessage) -> Result<Self, ButtplugMessageError>
Performs the conversion.
source§impl TryFrom<ButtplugServerMessage> for ButtplugSpecV3ServerMessage
impl TryFrom<ButtplugServerMessage> for ButtplugSpecV3ServerMessage
§type Error = ButtplugMessageError
type Error = ButtplugMessageError
The type returned in the event of a conversion error.
source§fn try_from(msg: ButtplugServerMessage) -> Result<Self, ButtplugMessageError>
fn try_from(msg: ButtplugServerMessage) -> Result<Self, ButtplugMessageError>
Performs the conversion.
impl ButtplugServerMessageType for ButtplugServerMessage
impl StructuralPartialEq for ButtplugServerMessage
Auto Trait Implementations§
impl Freeze for ButtplugServerMessage
impl RefUnwindSafe for ButtplugServerMessage
impl Send for ButtplugServerMessage
impl Sync for ButtplugServerMessage
impl Unpin for ButtplugServerMessage
impl UnwindSafe for ButtplugServerMessage
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