pub struct ModuleRegistration {
pub name: String,
pub version: String,
pub capabilities: Vec<String>,
}Expand description
Registration message sent by module when connecting to server.
This is sent as the data payload of a Control message with ControlType::Register.
Fields§
§name: StringUnique name/identifier for this module (becomes its domain)
version: StringModule version string
capabilities: Vec<String>List of topics/capabilities this module provides
Implementations§
Source§impl ModuleRegistration
impl ModuleRegistration
pub fn new(name: &str, version: &str) -> Self
pub fn with_capabilities(self, caps: Vec<String>) -> Self
Sourcepub fn to_command_message(&self) -> CommandMessage
pub fn to_command_message(&self) -> CommandMessage
Convert to a CommandMessage for sending over IPC
Sourcepub fn from_command_message(msg: &CommandMessage) -> Result<Self, Error>
pub fn from_command_message(msg: &CommandMessage) -> Result<Self, Error>
Parse from a CommandMessage’s data field
Trait Implementations§
Source§impl Clone for ModuleRegistration
impl Clone for ModuleRegistration
Source§fn clone(&self) -> ModuleRegistration
fn clone(&self) -> ModuleRegistration
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 ModuleRegistration
impl Debug for ModuleRegistration
Source§impl<'de> Deserialize<'de> for ModuleRegistration
impl<'de> Deserialize<'de> for ModuleRegistration
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ModuleRegistration
impl RefUnwindSafe for ModuleRegistration
impl Send for ModuleRegistration
impl Sync for ModuleRegistration
impl Unpin for ModuleRegistration
impl UnwindSafe for ModuleRegistration
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