Skip to main content

VirtualDevice

Struct VirtualDevice 

Source
pub struct VirtualDevice { /* private fields */ }

Implementations§

Source§

impl VirtualDevice

Source

pub fn new( stack_tx: UnboundedSender<Bytes>, mtu: usize, ) -> (Self, Sender<Bytes>)

Trait Implementations§

Source§

impl Device for VirtualDevice

Source§

type RxToken<'a> = VirtualRxToken

Source§

type TxToken<'a> = VirtualTxToken

Source§

fn receive( &mut self, _timestamp: Instant, ) -> Option<(Self::RxToken<'_>, Self::TxToken<'_>)>

Construct a token pair consisting of one receive token and one transmit token. Read more
Source§

fn transmit(&mut self, _timestamp: Instant) -> Option<Self::TxToken<'_>>

Construct a transmit token. Read more
Source§

fn capabilities(&self) -> DeviceCapabilities

Get a description of device capabilities.

Auto Trait Implementations§

§

impl !RefUnwindSafe for VirtualDevice

§

impl !UnwindSafe for VirtualDevice

§

impl Forget for VirtualDevice

§

impl Freeze for VirtualDevice
where *const ArcInner<BoundedInner<Bytes>> is !null: Freeze, PhantomData<ArcInner<BoundedInner<Bytes>>>: Freeze, *const ArcInner<UnboundedInner<Bytes>> is !null: Freeze, PhantomData<ArcInner<UnboundedInner<Bytes>>>: Freeze,

§

impl Move for VirtualDevice

§

impl Send for VirtualDevice
where Arc<BoundedInner<Bytes>>: Send, Arc<UnboundedInner<Bytes>>: Send,

§

impl Sync for VirtualDevice
where Arc<BoundedInner<Bytes>>: Sync, Arc<UnboundedInner<Bytes>>: Sync,

§

impl Unpin for VirtualDevice
where Receiver<Bytes>: Unpin, UnboundedSenderInner<Bytes>: Unpin,

§

impl UnsafeUnpin for VirtualDevice
where *const ArcInner<BoundedInner<Bytes>> is !null: UnsafeUnpin, PhantomData<ArcInner<BoundedInner<Bytes>>>: UnsafeUnpin, *const ArcInner<UnboundedInner<Bytes>> is !null: UnsafeUnpin, PhantomData<ArcInner<UnboundedInner<Bytes>>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.