[][src]Struct ethox::layer::loss::LossyHandle

pub struct LossyHandle<H: ?Sized> { /* fields omitted */ }

A handle wrapper that sometimes doesn't queue packets.

This pretends to be static but internally wraps a reference to the underlying handle. This is of course unsafe but Device requires us to specify a single associated type as the handle so that it can not include a lifetime parameter.

However, the implementation ensures that the LossyHandle is itself only visible behind a mutable reference with the lifetime of the wrapped handle. It further does not allow to be copied or cloned. This ensures that no reference with larger lifetime can be created.

Trait Implementations

impl<H: Handle + ?Sized> Handle for LossyHandle<H>[src]

Auto Trait Implementations

impl<H> !Send for LossyHandle<H>

impl<H> !Sync for LossyHandle<H>

impl<H: ?Sized> Unpin for LossyHandle<H>

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.