pub trait MessageHelpers {
// Required methods
fn find_option(&self, tag: u8) -> Option<&MessageOptions>;
fn add_option(&mut self, option: MessageOptions);
fn get_mac_address(&self) -> MacAddress;
}Expand description
Define common methods on your custom Message that a client or server will need to use.
…or don’t and use our homemade Message with this already implemented.
Required Methods§
Sourcefn find_option(&self, tag: u8) -> Option<&MessageOptions>
fn find_option(&self, tag: u8) -> Option<&MessageOptions>
Search this Message’s list of options for a specific option.
Sourcefn add_option(&mut self, option: MessageOptions)
fn add_option(&mut self, option: MessageOptions)
Add an option to the list of options
Sourcefn get_mac_address(&self) -> MacAddress
fn get_mac_address(&self) -> MacAddress
Parses the chaddr field as a mac address.