pub struct MldAddressRecord<'a> { /* private fields */ }Expand description
A read/write wrapper around an MLDv2 Listener Report Message Address Record.
Implementations§
Source§impl<'a> AddressRecord<'a>
impl<'a> AddressRecord<'a>
Sourcepub const fn new_unchecked(buffer: &'a mut [u8]) -> Self
pub const fn new_unchecked(buffer: &'a mut [u8]) -> Self
Imbue a raw octet buffer with a Address Record structure.
Sourcepub fn new_checked(buffer: &'a mut [u8]) -> Result<Self>
pub fn new_checked(buffer: &'a mut [u8]) -> Result<Self>
Shorthand for a combination of new_unchecked and check_len.
Source§impl<'a> AddressRecord<'a>
Getters for a MLDv2 Listener Report Message Address Record.
See RFC 3810 § 5.2.
impl<'a> AddressRecord<'a>
Getters for a MLDv2 Listener Report Message Address Record. See RFC 3810 § 5.2.
Sourcepub fn record_type(&self) -> RecordType
pub fn record_type(&self) -> RecordType
Return the record type for the given sources.
Sourcepub fn aux_data_len(&self) -> u8
pub fn aux_data_len(&self) -> u8
Return the length of the auxiliary data.
Sourcepub fn mcast_addr(&self) -> Ipv6Address
pub fn mcast_addr(&self) -> Ipv6Address
Return the multicast address field.
Source§impl<'a> AddressRecord<'a>
Setters for a MLDv2 Listener Report Message Address Record.
See RFC 3810 § 5.2.
impl<'a> AddressRecord<'a>
Setters for a MLDv2 Listener Report Message Address Record. See RFC 3810 § 5.2.
Sourcepub fn set_record_type(&mut self, rty: RecordType)
pub fn set_record_type(&mut self, rty: RecordType)
Set the record type for the given sources.
Sourcepub fn set_aux_data_len(&mut self, len: u8)
pub fn set_aux_data_len(&mut self, len: u8)
Set the length of the auxiliary data.
Sourcepub fn set_num_srcs(&mut self, num_srcs: u16)
pub fn set_num_srcs(&mut self, num_srcs: u16)
Set the number of sources field.
Sourcepub fn set_mcast_addr(&mut self, addr: Ipv6Address)
pub fn set_mcast_addr(&mut self, addr: Ipv6Address)
Set the multicast address field.
§Panics
This function panics if the given address is not a multicast address.
Sourcepub fn payload_mut(&mut self) -> &mut [u8] ⓘ
pub fn payload_mut(&mut self) -> &mut [u8] ⓘ
Return a mutable pointer to the address records.
Trait Implementations§
Source§impl<'a> Debug for AddressRecord<'a>
impl<'a> Debug for AddressRecord<'a>
impl<'a> Eq for AddressRecord<'a>
Source§impl<'a> PartialEq for AddressRecord<'a>
impl<'a> PartialEq for AddressRecord<'a>
impl<'a> StructuralPartialEq for AddressRecord<'a>
Auto Trait Implementations§
impl<'a> !UnwindSafe for AddressRecord<'a>
impl<'a> Freeze for AddressRecord<'a>
impl<'a> RefUnwindSafe for AddressRecord<'a>
impl<'a> Send for AddressRecord<'a>
impl<'a> Sync for AddressRecord<'a>
impl<'a> Unpin for AddressRecord<'a>
impl<'a> UnsafeUnpin for AddressRecord<'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