Struct dhcproto::v6::DhcpOptions
source · pub struct DhcpOptions(/* private fields */);
Expand description
Implementations§
source§impl DhcpOptions
impl DhcpOptions
sourcepub fn get(&self, code: OptionCode) -> Option<&DhcpOption>
pub fn get(&self, code: OptionCode) -> Option<&DhcpOption>
get the first element matching this option code
sourcepub fn get_all(&self, code: OptionCode) -> Option<&[DhcpOption]>
pub fn get_all(&self, code: OptionCode) -> Option<&[DhcpOption]>
get all elements matching this option code
sourcepub fn get_mut(&mut self, code: OptionCode) -> Option<&mut DhcpOption>
pub fn get_mut(&mut self, code: OptionCode) -> Option<&mut DhcpOption>
get the first element matching this option code
sourcepub fn get_mut_all(&mut self, code: OptionCode) -> Option<&mut [DhcpOption]>
pub fn get_mut_all(&mut self, code: OptionCode) -> Option<&mut [DhcpOption]>
get all elements matching this option code
sourcepub fn remove(&mut self, code: OptionCode) -> Option<DhcpOption>
pub fn remove(&mut self, code: OptionCode) -> Option<DhcpOption>
remove the first element with a matching option code
sourcepub fn remove_all(
&mut self,
code: OptionCode
) -> Option<impl Iterator<Item = DhcpOption> + '_>
pub fn remove_all( &mut self, code: OptionCode ) -> Option<impl Iterator<Item = DhcpOption> + '_>
remove all elements with a matching option code
sourcepub fn insert(&mut self, opt: DhcpOption)
pub fn insert(&mut self, opt: DhcpOption)
insert a new option into the list of opts
sourcepub fn iter(&self) -> impl Iterator<Item = &DhcpOption>
pub fn iter(&self) -> impl Iterator<Item = &DhcpOption>
return a reference to an iterator
sourcepub fn iter_mut(&mut self) -> impl Iterator<Item = &mut DhcpOption>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut DhcpOption>
return a mutable ref to an iterator
Trait Implementations§
source§impl Clone for DhcpOptions
impl Clone for DhcpOptions
source§fn clone(&self) -> DhcpOptions
fn clone(&self) -> DhcpOptions
Returns a copy 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 Decodable for DhcpOptions
impl Decodable for DhcpOptions
source§fn decode(decoder: &mut Decoder<'_>) -> DecodeResult<Self>
fn decode(decoder: &mut Decoder<'_>) -> DecodeResult<Self>
Read the type from the stream
source§fn from_bytes(bytes: &[u8]) -> DecodeResult<Self>
fn from_bytes(bytes: &[u8]) -> DecodeResult<Self>
Returns the object in binary form
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 Encodable for DhcpOptions
impl Encodable for DhcpOptions
source§impl FromIterator<DhcpOption> for DhcpOptions
impl FromIterator<DhcpOption> for DhcpOptions
source§fn from_iter<T: IntoIterator<Item = DhcpOption>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = DhcpOption>>(iter: T) -> Self
Creates a value from an iterator. Read more
source§impl IntoIterator for DhcpOptions
impl IntoIterator for DhcpOptions
§type Item = DhcpOption
type Item = DhcpOption
The type of the elements being iterated over.
§type IntoIter = IntoIter<<DhcpOptions as IntoIterator>::Item>
type IntoIter = IntoIter<<DhcpOptions as IntoIterator>::Item>
Which kind of iterator are we turning this into?
source§impl PartialEq for DhcpOptions
impl PartialEq for DhcpOptions
source§fn eq(&self, other: &DhcpOptions) -> bool
fn eq(&self, other: &DhcpOptions) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for DhcpOptions
impl StructuralEq for DhcpOptions
impl StructuralPartialEq for DhcpOptions
Auto Trait Implementations§
impl RefUnwindSafe for DhcpOptions
impl Send for DhcpOptions
impl Sync for DhcpOptions
impl Unpin 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