[−][src]Trait buttplug::core::messages::ButtplugMessage
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.
Provided methods
fn as_protocol_json(self) -> String where
Self: ButtplugMessage + Serialize + Deserialize<'static>,
Self: ButtplugMessage + Serialize + Deserialize<'static>,
Returns the message as a string in Buttplug JSON Protocol format.