use super::MessageOptions;
use mac_address::MacAddress;

/// Define common methods on your custom Message
/// that a client or server will need to use.
///
/// ...or don't and use our homemade [Message](crate::v4::message::Message)
/// with this already implemented.
pub trait MessageHelpers {
    /// Search this Message's list of options for a specific option.
    fn find_option(&self, tag: u8) -> Option<&MessageOptions>;

    /// Add an option to the list of options
    fn add_option(&mut self, option: MessageOptions);

    /// Parses the chaddr field as a mac address.
    fn get_mac_address(&self) -> MacAddress;
}
