Struct smoltcp::wire::MldAddressRecord[][src]

pub struct MldAddressRecord<T: AsRef<[u8]>> { /* fields omitted */ }

A read/write wrapper around an MLDv2 Listener Report Message Address Record.

Implementations

impl<T: AsRef<[u8]>> AddressRecord<T>[src]

pub fn new_unchecked(buffer: T) -> Self[src]

Imbue a raw octet buffer with a Address Record structure.

pub fn new_checked(buffer: T) -> Result<Self>[src]

Shorthand for a combination of new_unchecked and check_len.

pub fn check_len(&self) -> Result<()>[src]

Ensure that no accessor method will panic if called. Returns Err(Error::Truncated) if the buffer is too short.

pub fn into_inner(self) -> T[src]

Consume the packet, returning the underlying buffer.

impl<T: AsRef<[u8]>> AddressRecord<T>[src]

Getters for a MLDv2 Listener Report Message Address Record. See RFC 3810 § 5.2.

pub fn record_type(&self) -> RecordType[src]

Return the record type for the given sources.

pub fn aux_data_len(&self) -> u8[src]

Return the length of the auxilary data.

pub fn num_srcs(&self) -> u16[src]

Return the number of sources field.

pub fn mcast_addr(&self) -> Ipv6Address[src]

Return the multicast address field.

impl<'a, T: AsRef<[u8]> + ?Sized> AddressRecord<&'a T>[src]

pub fn payload(&self) -> &'a [u8][src]

Return a pointer to the address records.

impl<T: AsMut<[u8]> + AsRef<[u8]>> AddressRecord<T>[src]

Setters for a MLDv2 Listener Report Message Address Record. See RFC 3810 § 5.2.

pub fn set_record_type(&mut self, rty: RecordType)[src]

Return the record type for the given sources.

pub fn set_aux_data_len(&mut self, len: u8)[src]

Return the length of the auxilary data.

pub fn set_num_srcs(&mut self, num_srcs: u16)[src]

Return the number of sources field.

pub fn set_mcast_addr(&mut self, addr: Ipv6Address)[src]

Return the multicast address field.

Panics

This function panics if the given address is not a multicast address.

impl<T: AsRef<[u8]> + AsMut<[u8]>> AddressRecord<T>[src]

pub fn payload_mut(&mut self) -> &mut [u8][src]

Return a pointer to the address records.

Trait Implementations

impl<T: Clone + AsRef<[u8]>> Clone for AddressRecord<T>[src]

impl<T: Debug + AsRef<[u8]>> Debug for AddressRecord<T>[src]

impl<T: PartialEq + AsRef<[u8]>> PartialEq<AddressRecord<T>> for AddressRecord<T>[src]

impl<T: AsRef<[u8]>> StructuralPartialEq for AddressRecord<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for AddressRecord<T> where
    T: RefUnwindSafe

impl<T> Send for AddressRecord<T> where
    T: Send

impl<T> Sync for AddressRecord<T> where
    T: Sync

impl<T> Unpin for AddressRecord<T> where
    T: Unpin

impl<T> UnwindSafe for AddressRecord<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.