[][src]Trait buttplug::core::messages::ButtplugMessage

pub trait ButtplugMessage: Send + Sync + Clone {
    fn get_id(&self) -> u32;
fn set_id(&mut self, id: u32); fn as_protocol_json(self) -> String
    where
        Self: ButtplugMessage + Serialize + Deserialize<'static>
, { ... } }

Base trait for all Buttplug Protocol Message Structs. Handles management of message ids, as well as implementing conveinence functions for converting between message structs and [ButtplugMessageUnion] enums, serialization, etc...

Required methods

fn get_id(&self) -> u32

Returns the id number of the message

fn set_id(&mut self, id: u32)

Sets the id number of the message.

Loading content...

Provided methods

fn as_protocol_json(self) -> String where
    Self: ButtplugMessage + Serialize + Deserialize<'static>, 

Returns the message as a string in Buttplug JSON Protocol format.

Loading content...

Implementors

impl ButtplugMessage for ButtplugDeviceCommandMessageUnion[src]

impl ButtplugMessage for ButtplugDeviceManagerMessageUnion[src]

impl ButtplugMessage for ButtplugInMessage[src]

impl ButtplugMessage for ButtplugOutMessage[src]

impl ButtplugMessage for ButtplugSpecV2InMessage[src]

impl ButtplugMessage for ButtplugSpecV2OutMessage[src]

impl ButtplugMessage for DeviceAdded[src]

impl ButtplugMessage for DeviceAddedV0[src]

impl ButtplugMessage for DeviceAddedV1[src]

impl ButtplugMessage for DeviceList[src]

impl ButtplugMessage for DeviceListV0[src]

impl ButtplugMessage for DeviceListV1[src]

impl ButtplugMessage for DeviceRemoved[src]

impl ButtplugMessage for Error[src]

impl ButtplugMessage for FleshlightLaunchFW12Cmd[src]

impl ButtplugMessage for KiirooCmd[src]

impl ButtplugMessage for LinearCmd[src]

impl ButtplugMessage for Log[src]

impl ButtplugMessage for LovenseCmd[src]

impl ButtplugMessage for Ok[src]

impl ButtplugMessage for Ping[src]

impl ButtplugMessage for RawReadCmd[src]

impl ButtplugMessage for RawReading[src]

impl ButtplugMessage for RawWriteCmd[src]

impl ButtplugMessage for RequestDeviceList[src]

impl ButtplugMessage for RequestLog[src]

impl ButtplugMessage for RequestServerInfo[src]

impl ButtplugMessage for RotateCmd[src]

impl ButtplugMessage for ScanningFinished[src]

impl ButtplugMessage for ServerInfo[src]

impl ButtplugMessage for ServerInfoV0[src]

impl ButtplugMessage for SingleMotorVibrateCmd[src]

impl ButtplugMessage for StartScanning[src]

impl ButtplugMessage for StopAllDevices[src]

impl ButtplugMessage for StopDeviceCmd[src]

impl ButtplugMessage for StopScanning[src]

impl ButtplugMessage for SubscribeCmd[src]

impl ButtplugMessage for Test[src]

impl ButtplugMessage for UnsubscribeCmd[src]

impl ButtplugMessage for VibrateCmd[src]

impl ButtplugMessage for VorzeA10CycloneCmd[src]

Loading content...