[][src]Struct ethox::nic::loopback::Loopback

pub struct Loopback<'r, C> { /* fields omitted */ }

A software loop-back device.

Maintains a ring buffer of packet buffers in flight.

Methods

impl<'r, C: PayloadMut> Loopback<'r, C>[src]

pub fn new(buffer: Slice<'r, C>) -> Self[src]

Create a loop-back device with mtu.

It will divide the packet buffer into chunks of the provided mtu and keep track of free and used buffers

pub fn set_current_time(&mut self, instant: Instant)[src]

Update the timestamp on all future received packets.

Trait Implementations

impl<'a, C: PayloadMut> Device for Loopback<'a, C>[src]

type Handle = Handle

The control handle type also providing packet meta information.

type Payload = C

The payload buffer type of this device. Read more

Auto Trait Implementations

impl<'r, C> Send for Loopback<'r, C> where
    C: Send

impl<'r, C> Sync for Loopback<'r, C> where
    C: Sync

impl<'r, C> Unpin for Loopback<'r, C> where
    C: Unpin

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.