Struct smoltcp::wire::MldAddressRecord [−][src]
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]
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]
fn clone(&self) -> AddressRecord<T>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Debug + AsRef<[u8]>> Debug for AddressRecord<T>
[src]
impl<T: PartialEq + AsRef<[u8]>> PartialEq<AddressRecord<T>> for AddressRecord<T>
[src]
fn eq(&self, other: &AddressRecord<T>) -> bool
[src]
fn ne(&self, other: &AddressRecord<T>) -> bool
[src]
impl<T: AsRef<[u8]>> StructuralPartialEq for AddressRecord<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for AddressRecord<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for AddressRecord<T> where
T: Send,
T: Send,
impl<T> Sync for AddressRecord<T> where
T: Sync,
T: Sync,
impl<T> Unpin for AddressRecord<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for AddressRecord<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,