pub struct DhcpOptions {
pub other: HashMap<DhcpOption, Vec<u8>>,
}Fields§
§other: HashMap<DhcpOption, Vec<u8>>Implementations§
Source§impl DhcpOptions
impl DhcpOptions
pub fn get_raw_option(&self, option: &DhcpOption) -> Option<&[u8]>
pub fn get_option<T: DhcpParse>(&self, option: &DhcpOption) -> Option<T::Item>
pub fn get_serverid(&self) -> Option<Ipv4Addr>
pub fn get_clientid(&self) -> Option<Vec<u8>>
pub fn get_address_request(&self) -> Option<Ipv4Addr>
pub fn get_messagetype(&self) -> Option<MessageType>
pub fn get_hostname(&self) -> Option<String>
pub fn set_raw_option(self, option: &DhcpOption, value: &[u8]) -> Self
pub fn set_option<T: Serialise>(self, option: &DhcpOption, value: &T) -> Self
pub fn mutate_option<T: Serialise>(&mut self, option: &DhcpOption, value: &T)
pub fn mutate_option_value( &mut self, option: &DhcpOption, value: &DhcpOptionTypeValue, )
pub fn maybe_set_option<T: Serialise>( self, option: &DhcpOption, value: Option<&T>, ) -> Self
pub fn remove_option(self, option: &DhcpOption) -> Self
Trait Implementations§
Source§impl Clone for DhcpOptions
impl Clone for DhcpOptions
Source§fn clone(&self) -> DhcpOptions
fn clone(&self) -> DhcpOptions
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 DhcpOptions
impl Debug for DhcpOptions
Source§impl Default for DhcpOptions
impl Default for DhcpOptions
Source§fn default() -> DhcpOptions
fn default() -> DhcpOptions
Returns the “default value” for a type. Read more
Source§impl PartialEq for DhcpOptions
impl PartialEq for DhcpOptions
impl Eq for DhcpOptions
impl StructuralPartialEq for DhcpOptions
Auto Trait Implementations§
impl Freeze for DhcpOptions
impl RefUnwindSafe for DhcpOptions
impl Send for DhcpOptions
impl Sync for DhcpOptions
impl Unpin for DhcpOptions
impl UnsafeUnpin for DhcpOptions
impl UnwindSafe for DhcpOptions
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