pub enum ButtplugServerMessageVariant {
V0(ButtplugServerMessageV0),
V1(ButtplugServerMessageV1),
V2(ButtplugServerMessageV2),
V3(ButtplugServerMessageV3),
V4(ButtplugServerMessageV4),
}Variants§
V0(ButtplugServerMessageV0)
V1(ButtplugServerMessageV1)
V2(ButtplugServerMessageV2)
V3(ButtplugServerMessageV3)
V4(ButtplugServerMessageV4)
Implementations§
Source§impl ButtplugServerMessageVariant
impl ButtplugServerMessageVariant
pub fn version(&self) -> ButtplugMessageSpecVersion
Trait Implementations§
Source§impl ButtplugMessageValidator for ButtplugServerMessageVariant
impl ButtplugMessageValidator for ButtplugServerMessageVariant
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 ButtplugServerMessageVariant
impl Clone for ButtplugServerMessageVariant
Source§fn clone(&self) -> ButtplugServerMessageVariant
fn clone(&self) -> ButtplugServerMessageVariant
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 ButtplugServerMessageVariant
impl Debug for ButtplugServerMessageVariant
Source§impl From<ButtplugServerMessageV0> for ButtplugServerMessageVariant
impl From<ButtplugServerMessageV0> for ButtplugServerMessageVariant
Source§fn from(value: ButtplugServerMessageV0) -> Self
fn from(value: ButtplugServerMessageV0) -> Self
Converts to this type from the input type.
Source§impl From<ButtplugServerMessageV1> for ButtplugServerMessageVariant
impl From<ButtplugServerMessageV1> for ButtplugServerMessageVariant
Source§fn from(value: ButtplugServerMessageV1) -> Self
fn from(value: ButtplugServerMessageV1) -> Self
Converts to this type from the input type.
Source§impl From<ButtplugServerMessageV2> for ButtplugServerMessageVariant
impl From<ButtplugServerMessageV2> for ButtplugServerMessageVariant
Source§fn from(value: ButtplugServerMessageV2) -> Self
fn from(value: ButtplugServerMessageV2) -> Self
Converts to this type from the input type.
Source§impl From<ButtplugServerMessageV3> for ButtplugServerMessageVariant
impl From<ButtplugServerMessageV3> for ButtplugServerMessageVariant
Source§fn from(value: ButtplugServerMessageV3) -> Self
fn from(value: ButtplugServerMessageV3) -> 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.
Auto Trait Implementations§
impl Freeze for ButtplugServerMessageVariant
impl RefUnwindSafe for ButtplugServerMessageVariant
impl Send for ButtplugServerMessageVariant
impl Sync for ButtplugServerMessageVariant
impl Unpin for ButtplugServerMessageVariant
impl UnwindSafe for ButtplugServerMessageVariant
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