[−][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
fn as_union(self) -> ButtplugMessageUnion
Returns the message as a ButtplugMessageUnion enum.
Provided methods
fn as_protocol_json(&self) -> String
Returns the message as a string in Buttplug JSON Protocol format.