[][src]Struct packet::icmp::redirect_message::Packet

pub struct Packet<B> { /* fields omitted */ }

Redirect Message packet parser.

Implementations

impl<B: AsRef<[u8]>> Packet<B>[src]

pub fn unchecked(buffer: B) -> Packet<B>[src]

Create a Redirect Message packet without checking the buffer contents.

pub fn new(buffer: B) -> Result<Packet<B>>[src]

Parse a Redirect Message packet, checking the buffer contents are correct.

impl<B: AsRef<[u8]>> Packet<B>[src]

pub fn to_owned(&self) -> Packet<Vec<u8>>[src]

Convert the packet to its owned version.

Notes

It would be nice if ToOwned could be implemented, but Packet already implements Clone and the impl would conflict.

impl<B: AsRef<[u8]>> Packet<B>[src]

pub fn gateway(&self) -> Ipv4Addr[src]

Gateway to redirect the packet to.

pub fn packet(&self) -> Result<Packet<&[u8]>>[src]

Packet to redirect.

Trait Implementations

impl<B: AsRef<[u8]> + AsMut<[u8]>> AsMut<[u8]> for Packet<B>[src]

impl<'a, B: AsRef<[u8]>> AsPacket<'a, Packet<&'a [u8]>> for B[src]

impl<'a, B: AsRef<[u8]> + AsMut<[u8]>> AsPacketMut<'a, Packet<&'a mut [u8]>> for B[src]

impl<B: AsRef<[u8]>> AsRef<[u8]> for Packet<B>[src]

impl<B: AsRef<[u8]>> Debug for Packet<B>[src]

impl<B> Max for Packet<B>[src]

impl<B> Max for Packet<B>[src]

impl<B> Min for Packet<B>[src]

impl<B> Min for Packet<B>[src]

impl<B: AsRef<[u8]>> Packet for Packet<B>[src]

impl<B: AsRef<[u8]> + AsMut<[u8]>> PacketMut for Packet<B>[src]

impl<B: AsRef<[u8]>> Size for Packet<B>[src]

impl<B: AsRef<[u8]>> Size for Packet<B>[src]

Auto Trait Implementations

impl<B> RefUnwindSafe for Packet<B> where
    B: RefUnwindSafe

impl<B> Send for Packet<B> where
    B: Send

impl<B> Sync for Packet<B> where
    B: Sync

impl<B> Unpin for Packet<B> where
    B: Unpin

impl<B> UnwindSafe for Packet<B> where
    B: 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> Max for T where
    T: Max + Max
[src]

impl<T> Min for T where
    T: Min + Min
[src]

impl<T> Size for T where
    T: Size + Size
[src]

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.