pub struct Encoder;Expand description
A base transform that just copies the old message.
Trait Implementations§
Source§impl Encode for Encoder
impl Encode for Encoder
Source§fn max_size_diff(&self) -> usize
fn max_size_diff(&self) -> usize
Returns the largest byte size increase this encoder can incur
when reencoding any message.
Source§fn encode<'dst, T: AsRef<[u8]>>(
self,
src: &Message<T>,
dst: &'dst mut [u8],
) -> Result<Message<&'dst mut [u8]>, Error>where
Self: Sized,
fn encode<'dst, T: AsRef<[u8]>>(
self,
src: &Message<T>,
dst: &'dst mut [u8],
) -> Result<Message<&'dst mut [u8]>, Error>where
Self: Sized,
Reencodes the given DHCPv4 message using this transform. Read more
Source§fn encode_to_owned<T: AsRef<[u8]>>(
self,
src: &Message<T>,
) -> Result<Message<Vec<u8>>, Error>where
Self: Sized,
fn encode_to_owned<T: AsRef<[u8]>>(
self,
src: &Message<T>,
) -> Result<Message<Vec<u8>>, Error>where
Self: Sized,
Reencodes the given DHCPv4 message to a new owned buffer.
Source§fn append_options<I>(self, options: I) -> AppendOptions<Self, I>where
Self: Sized,
fn append_options<I>(self, options: I) -> AppendOptions<Self, I>where
Self: Sized,
Returns a new transform that additionally appends the given options.
Source§fn set_option(self, option: DhcpOption<'_>) -> SetOption<'_, Self>where
Self: Sized,
fn set_option(self, option: DhcpOption<'_>) -> SetOption<'_, Self>where
Self: Sized,
Returns a new transform that additionally sets the given option. Read more
Source§fn filter_options<F>(self, f: F) -> FilterOptions<Self, F>
fn filter_options<F>(self, f: F) -> FilterOptions<Self, F>
Returns a new transform that initially discards any options
for which the function returns true.
Auto Trait Implementations§
impl Freeze for Encoder
impl RefUnwindSafe for Encoder
impl Send for Encoder
impl Sync for Encoder
impl Unpin for Encoder
impl UnwindSafe for Encoder
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