Struct smoltcp::phy::FuzzInjector

source ·
pub struct FuzzInjector<D: Device, FTx: Fuzzer, FRx: Fuzzer> { /* private fields */ }
Expand description

A fuzz injector device.

A fuzz injector is a device that alters packets traversing through it according to the directions of a guided fuzzer. It is designed to support fuzzing internal state machines inside smoltcp, and is not for production use.

Implementations§

source§

impl<D: Device, FTx: Fuzzer, FRx: Fuzzer> FuzzInjector<D, FTx, FRx>

source

pub fn new(inner: D, fuzz_tx: FTx, fuzz_rx: FRx) -> FuzzInjector<D, FTx, FRx>

Create a fuzz injector device.

source

pub fn into_inner(self) -> D

Return the underlying device, consuming the fuzz injector.

Trait Implementations§

source§

impl<D: Debug + Device, FTx: Debug + Fuzzer, FRx: Debug + Fuzzer> Debug for FuzzInjector<D, FTx, FRx>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<D: Device, FTx, FRx> Device for FuzzInjector<D, FTx, FRx>
where FTx: Fuzzer, FRx: Fuzzer,

source§

type RxToken<'a> = RxToken<'a, <D as Device>::RxToken<'a>, FRx> where Self: 'a

source§

type TxToken<'a> = TxToken<'a, <D as Device>::TxToken<'a>, FTx> where Self: 'a

source§

fn capabilities(&self) -> DeviceCapabilities

Get a description of device capabilities.
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

Auto Trait Implementations§

§

impl<D, FTx, FRx> Freeze for FuzzInjector<D, FTx, FRx>
where D: Freeze, FTx: Freeze, FRx: Freeze,

§

impl<D, FTx, FRx> RefUnwindSafe for FuzzInjector<D, FTx, FRx>
where D: RefUnwindSafe, FTx: RefUnwindSafe, FRx: RefUnwindSafe,

§

impl<D, FTx, FRx> Send for FuzzInjector<D, FTx, FRx>
where D: Send, FTx: Send, FRx: Send,

§

impl<D, FTx, FRx> Sync for FuzzInjector<D, FTx, FRx>
where D: Sync, FTx: Sync, FRx: Sync,

§

impl<D, FTx, FRx> Unpin for FuzzInjector<D, FTx, FRx>
where D: Unpin, FTx: Unpin, FRx: Unpin,

§

impl<D, FTx, FRx> UnwindSafe for FuzzInjector<D, FTx, FRx>
where D: UnwindSafe, FTx: UnwindSafe, FRx: UnwindSafe,

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.