[][src]Struct packet::ether::Builder

pub struct Builder<B: Buffer = Dynamic> { /* fields omitted */ }

Ethernet frame builder.

Implementations

impl<B: Buffer> Builder<B>[src]

pub fn destination(self, value: HwAddr) -> Result<Self>[src]

MAC address for the destination.

pub fn source(self, value: HwAddr) -> Result<Self>[src]

MAC address for the source.

pub fn protocol(self, value: Protocol) -> Result<Self>[src]

Protocol of the inner packet.

pub fn payload<'a, T: IntoIterator<Item = &'a u8>>(
    self,
    value: T
) -> Result<Self>
[src]

Payload for the frame.

pub fn ip(self) -> Result<Builder<B>>[src]

Build an IP packet inside the Ethernet frame.

Trait Implementations

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

impl<'a, B: Buffer> AsPacketMut<'a, Packet<&'a mut [u8]>> for Builder<B>[src]

impl<B: Buffer> Builder<B> for Builder<B>[src]

impl<B: Debug + Buffer> Debug for Builder<B>[src]

impl Default for Builder<Dynamic>[src]

Auto Trait Implementations

impl<B = Buffer> !RefUnwindSafe for Builder<B>

impl<B = Buffer> !Send for Builder<B>

impl<B = Buffer> !Sync for Builder<B>

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

impl<B = Buffer> !UnwindSafe for Builder<B>

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, 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.