pub struct DhcpOptionWriter<'a> { /* private fields */ }Expand description
Writes DHCP options into the options field of a packet, one after the other.
Returned by Packet::options_mut.
Implementations§
Source§impl<'a> OptionWriter<'a>
impl<'a> OptionWriter<'a>
Sourcepub fn emit(&mut self, option: DhcpOption<'_>) -> Result<()>
pub fn emit(&mut self, option: DhcpOption<'_>) -> Result<()>
Write one option.
Errors if the option data is longer than 255 bytes or doesn’t fit in the remaining space.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !UnwindSafe for OptionWriter<'a>
impl<'a> Freeze for OptionWriter<'a>
impl<'a> RefUnwindSafe for OptionWriter<'a>
impl<'a> Send for OptionWriter<'a>
impl<'a> Sync for OptionWriter<'a>
impl<'a> Unpin for OptionWriter<'a>
impl<'a> UnsafeUnpin for OptionWriter<'a>
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