pub enum ButtplugDeviceCommandMessageUnion {
Show 18 variants FleshlightLaunchFW12Cmd(FleshlightLaunchFW12Cmd), SingleMotorVibrateCmd(SingleMotorVibrateCmd), VorzeA10CycloneCmd(VorzeA10CycloneCmd), KiirooCmd(KiirooCmd), VibrateCmd(VibrateCmd), LinearCmd(LinearCmd), RotateCmd(RotateCmd), RawWriteCmd(RawWriteCmd), RawReadCmd(RawReadCmd), StopDeviceCmd(StopDeviceCmd), RawSubscribeCmd(RawSubscribeCmd), RawUnsubscribeCmd(RawUnsubscribeCmd), BatteryLevelCmd(BatteryLevelCmd), RSSILevelCmd(RSSILevelCmd), ScalarCmd(ScalarCmd), SensorReadCmd(SensorReadCmd), SensorSubscribeCmd(SensorSubscribeCmd), SensorUnsubscribeCmd(SensorUnsubscribeCmd),
}
Expand description

Represents all possible device command message types.

Variants§

§

FleshlightLaunchFW12Cmd(FleshlightLaunchFW12Cmd)

§

SingleMotorVibrateCmd(SingleMotorVibrateCmd)

§

VorzeA10CycloneCmd(VorzeA10CycloneCmd)

§

KiirooCmd(KiirooCmd)

§

VibrateCmd(VibrateCmd)

§

LinearCmd(LinearCmd)

§

RotateCmd(RotateCmd)

§

RawWriteCmd(RawWriteCmd)

§

RawReadCmd(RawReadCmd)

§

StopDeviceCmd(StopDeviceCmd)

§

RawSubscribeCmd(RawSubscribeCmd)

§

RawUnsubscribeCmd(RawUnsubscribeCmd)

§

BatteryLevelCmd(BatteryLevelCmd)

§

RSSILevelCmd(RSSILevelCmd)

§

ScalarCmd(ScalarCmd)

§

SensorReadCmd(SensorReadCmd)

§

SensorSubscribeCmd(SensorSubscribeCmd)

§

SensorUnsubscribeCmd(SensorUnsubscribeCmd)

Trait Implementations§

source§

impl ButtplugDeviceMessage for ButtplugDeviceCommandMessageUnion

source§

fn device_index(&self) -> u32

source§

fn set_device_index(&mut self, id: u32)

source§

impl ButtplugMessage for ButtplugDeviceCommandMessageUnion

source§

fn id(&self) -> u32

Returns the id number of the message
source§

fn set_id(&mut self, id: u32)

Sets the id number of the message.
source§

fn is_server_event(&self) -> bool

True if the message is an event (message id of 0) from the server.
source§

impl ButtplugMessageFinalizer for ButtplugDeviceCommandMessageUnion

source§

fn finalize(&mut self)

source§

impl ButtplugMessageValidator for ButtplugDeviceCommandMessageUnion

source§

fn is_valid(&self) -> Result<(), ButtplugMessageError>

Returns () if the message is valid, otherwise returns a message error.
source§

fn is_system_id(&self, id: u32) -> Result<(), ButtplugMessageError>

source§

fn is_not_system_id(&self, id: u32) -> Result<(), ButtplugMessageError>

source§

fn is_in_command_range( &self, value: f64, error_msg: String ) -> Result<(), ButtplugMessageError>

source§

impl Clone for ButtplugDeviceCommandMessageUnion

source§

fn clone(&self) -> ButtplugDeviceCommandMessageUnion

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ButtplugDeviceCommandMessageUnion

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ButtplugDeviceCommandMessageUnion

source§

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<BatteryLevelCmd> for ButtplugDeviceCommandMessageUnion

source§

fn from(msg: BatteryLevelCmd) -> ButtplugDeviceCommandMessageUnion

Converts to this type from the input type.
source§

impl From<ButtplugDeviceCommandMessageUnion> for ButtplugClientMessage

source§

fn from(msg: ButtplugDeviceCommandMessageUnion) -> ButtplugClientMessage

Converts to this type from the input type.
source§

impl From<FleshlightLaunchFW12Cmd> for ButtplugDeviceCommandMessageUnion

source§

fn from(msg: FleshlightLaunchFW12Cmd) -> ButtplugDeviceCommandMessageUnion

Converts to this type from the input type.
source§

impl From<KiirooCmd> for ButtplugDeviceCommandMessageUnion

source§

fn from(msg: KiirooCmd) -> ButtplugDeviceCommandMessageUnion

Converts to this type from the input type.
source§

impl From<LinearCmd> for ButtplugDeviceCommandMessageUnion

source§

fn from(msg: LinearCmd) -> ButtplugDeviceCommandMessageUnion

Converts to this type from the input type.
source§

impl From<RSSILevelCmd> for ButtplugDeviceCommandMessageUnion

source§

fn from(msg: RSSILevelCmd) -> ButtplugDeviceCommandMessageUnion

Converts to this type from the input type.
source§

impl From<RawReadCmd> for ButtplugDeviceCommandMessageUnion

source§

fn from(msg: RawReadCmd) -> ButtplugDeviceCommandMessageUnion

Converts to this type from the input type.
source§

impl From<RawSubscribeCmd> for ButtplugDeviceCommandMessageUnion

source§

fn from(msg: RawSubscribeCmd) -> ButtplugDeviceCommandMessageUnion

Converts to this type from the input type.
source§

impl From<RawUnsubscribeCmd> for ButtplugDeviceCommandMessageUnion

source§

fn from(msg: RawUnsubscribeCmd) -> ButtplugDeviceCommandMessageUnion

Converts to this type from the input type.
source§

impl From<RawWriteCmd> for ButtplugDeviceCommandMessageUnion

source§

fn from(msg: RawWriteCmd) -> ButtplugDeviceCommandMessageUnion

Converts to this type from the input type.
source§

impl From<RotateCmd> for ButtplugDeviceCommandMessageUnion

source§

fn from(msg: RotateCmd) -> ButtplugDeviceCommandMessageUnion

Converts to this type from the input type.
source§

impl From<ScalarCmd> for ButtplugDeviceCommandMessageUnion

source§

fn from(msg: ScalarCmd) -> ButtplugDeviceCommandMessageUnion

Converts to this type from the input type.
source§

impl From<SensorReadCmd> for ButtplugDeviceCommandMessageUnion

source§

fn from(msg: SensorReadCmd) -> ButtplugDeviceCommandMessageUnion

Converts to this type from the input type.
source§

impl From<SensorSubscribeCmd> for ButtplugDeviceCommandMessageUnion

source§

fn from(msg: SensorSubscribeCmd) -> ButtplugDeviceCommandMessageUnion

Converts to this type from the input type.
source§

impl From<SensorUnsubscribeCmd> for ButtplugDeviceCommandMessageUnion

source§

fn from(msg: SensorUnsubscribeCmd) -> ButtplugDeviceCommandMessageUnion

Converts to this type from the input type.
source§

impl From<SingleMotorVibrateCmd> for ButtplugDeviceCommandMessageUnion

source§

fn from(msg: SingleMotorVibrateCmd) -> ButtplugDeviceCommandMessageUnion

Converts to this type from the input type.
source§

impl From<StopDeviceCmd> for ButtplugDeviceCommandMessageUnion

source§

fn from(msg: StopDeviceCmd) -> ButtplugDeviceCommandMessageUnion

Converts to this type from the input type.
source§

impl From<VibrateCmd> for ButtplugDeviceCommandMessageUnion

source§

fn from(msg: VibrateCmd) -> ButtplugDeviceCommandMessageUnion

Converts to this type from the input type.
source§

impl From<VorzeA10CycloneCmd> for ButtplugDeviceCommandMessageUnion

source§

fn from(msg: VorzeA10CycloneCmd) -> ButtplugDeviceCommandMessageUnion

Converts to this type from the input type.
source§

impl PartialEq for ButtplugDeviceCommandMessageUnion

source§

fn eq(&self, other: &ButtplugDeviceCommandMessageUnion) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for ButtplugDeviceCommandMessageUnion

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryFrom<ButtplugClientMessage> for ButtplugDeviceCommandMessageUnion

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(msg: ButtplugClientMessage) -> Result<Self, &'static str>

Performs the conversion.
source§

impl ButtplugClientMessageType for ButtplugDeviceCommandMessageUnion

source§

impl StructuralPartialEq for ButtplugDeviceCommandMessageUnion

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,