Struct smoltcp::wire::Ipv6Option [−][src]
A read/write wrapper around an IPv6 Extension Header Option.
Implementations
impl<T: AsRef<[u8]>> Ipv6Option<T>
[src]
pub fn new_unchecked(buffer: T) -> Ipv6Option<T>
[src]
Create a raw octet buffer with an IPv6 Extension Header Option structure.
pub fn new_checked(buffer: T) -> Result<Ipv6Option<T>>
[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.
The result of this check is invalidated by calling set_data_len.
pub fn into_inner(self) -> T
[src]
Consume the ipv6 option, returning the underlying buffer.
pub fn option_type(&self) -> Type
[src]
Return the option type.
pub fn data_len(&self) -> u8
[src]
impl<'a, T: AsRef<[u8]> + ?Sized> Ipv6Option<&'a T>
[src]
impl<T: AsRef<[u8]> + AsMut<[u8]>> Ipv6Option<T>
[src]
pub fn set_option_type(&mut self, value: Type)
[src]
Set the option type.
pub fn set_data_len(&mut self, value: u8)
[src]
impl<'a, T: AsRef<[u8]> + AsMut<[u8]> + ?Sized> Ipv6Option<&'a mut T>
[src]
pub fn data_mut(&mut self) -> &mut [u8]
[src]
Return a mutable pointer to the option data.
Panics
This function panics if this is an 1-byte padding option.
Trait Implementations
impl<T: Debug + AsRef<[u8]>> Debug for Ipv6Option<T>
[src]
impl<'a, T: AsRef<[u8]> + ?Sized> Display for Ipv6Option<&'a T>
[src]
impl<T: PartialEq + AsRef<[u8]>> PartialEq<Ipv6Option<T>> for Ipv6Option<T>
[src]
fn eq(&self, other: &Ipv6Option<T>) -> bool
[src]
fn ne(&self, other: &Ipv6Option<T>) -> bool
[src]
impl<T: AsRef<[u8]>> StructuralPartialEq for Ipv6Option<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Ipv6Option<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Ipv6Option<T> where
T: Send,
T: Send,
impl<T> Sync for Ipv6Option<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Ipv6Option<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Ipv6Option<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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,