[−][src]Struct packet::ether::Builder
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]
self,
value: T
) -> Result<Self>
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]
pub fn with(buffer: B) -> Result<Self>
[src]
pub fn finalizer(&mut self) -> &mut Finalization
[src]
pub fn build(self) -> Result<B::Inner>
[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,
B: Unpin,
impl<B = Buffer> !UnwindSafe for Builder<B>
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, 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>,