Skip to main content

MockWifiController

Struct MockWifiController 

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

Implementations§

Source§

impl MockWifiController

Source

pub fn new( configuration: MockWifiConfiguration, ) -> Result<(MockWifiController, MockWifiRunner), Kind>

Source

pub fn simulate_disconnect(&self, error: WifiConnectionErrorKind)

Inject a link-loss event; cancels pending work as a radio event would.

Trait Implementations§

Source§

impl Clone for MockWifiController

Source§

fn clone(&self) -> MockWifiController

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl DirectBaseOperations for MockWifiController

Source§

fn read( &self, _: &mut Context<'_>, _: &mut [u8], _: u64, ) -> Poll<Result<usize, Kind>>

Source§

fn write( &self, _: &mut Context<'_>, _: &[u8], _: u64, ) -> Poll<Result<usize, Kind>>

Source§

fn control( &self, _: &mut Context<'_>, command: ControlCommandIdentifier, input: &AnyByLayout, output: &mut AnyByLayout, ) -> Poll<Result<(), Kind>>

Source§

fn flush(&self, _cx: &mut Context<'_>) -> Poll<Result<(), Kind>>

Source§

fn read_until( &self, cx: &mut Context<'_>, buffer: &mut [u8], absolute_position: u64, delimiter: &[u8], ) -> Poll<Result<usize, Kind>>

Source§

fn write_pattern( &self, cx: &mut Context<'_>, pattern: &[u8], count: usize, absolute_position: u64, ) -> Poll<Result<usize, Kind>>

Source§

fn write_vectored( &self, cx: &mut Context<'_>, buffers: &[&[u8]], absolute_position: u64, ) -> Poll<Result<usize, Kind>>

Source§

fn read_sync( &self, buffer: &mut [u8], absolute_position: u64, ) -> Result<usize, Kind>

Source§

fn write_sync( &self, buffer: &[u8], absolute_position: u64, ) -> Result<usize, Kind>

Source§

fn flush_sync(&self) -> Result<(), Kind>

Source§

fn control_sync( &self, command: ControlCommandIdentifier, input: &AnyByLayout, output: &mut AnyByLayout, ) -> Result<(), Kind>

Source§

fn read_until_sync( &self, buffer: &mut [u8], absolute_position: u64, delimiter: &[u8], ) -> Result<usize, Kind>

Source§

fn write_pattern_sync( &self, pattern: &[u8], count: usize, absolute_position: u64, ) -> Result<usize, Kind>

Source§

fn write_vectored_sync( &self, buffers: &[&[u8]], absolute_position: u64, ) -> Result<usize, Kind>

Source§

fn cancel_operation(&self, _operation: Operation)

Detach the current operation’s registration; see BaseOperations.
Source§

fn open(&self) -> Result<(), Kind>

Source§

fn close(&self) -> Result<(), Kind>

Source§

fn set_position(&self, current: u64, position: &Position) -> Result<u64, Kind>

Source§

impl DirectCharacterDevice for MockWifiController

Source§

fn readiness( &self, _interests: ReadyEvents, ) -> Result<Option<ReadyEvents>, Kind>

See CharacterDevice::readiness for the default and notification contract.
Source§

impl MountOperations for MockWifiController

Source§

fn mount(&self) -> Result<(), Kind>

Source§

fn unmount(&self) -> Result<(), Kind>

Auto Trait Implementations§

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> BaseOperations for T

Source§

fn read( &self, _: &mut Context, cx: &mut Context<'_>, buffer: &mut [u8], absolute_position: u64, ) -> Poll<Result<usize, Kind>>

Source§

fn write( &self, _: &mut Context, cx: &mut Context<'_>, buffer: &[u8], absolute_position: u64, ) -> Poll<Result<usize, Kind>>

Source§

fn flush(&self, _: &mut Context, cx: &mut Context<'_>) -> Poll<Result<(), Kind>>

Source§

fn control( &self, _: &mut Context, cx: &mut Context<'_>, command: ControlCommandIdentifier, input: &AnyByLayout, output: &mut AnyByLayout, ) -> Poll<Result<(), Kind>>

Source§

fn read_until( &self, _: &mut Context, cx: &mut Context<'_>, buffer: &mut [u8], absolute_position: u64, delimiter: &[u8], ) -> Poll<Result<usize, Kind>>

Source§

fn write_pattern( &self, _: &mut Context, cx: &mut Context<'_>, pattern: &[u8], count: usize, absolute_position: u64, ) -> Poll<Result<usize, Kind>>

Source§

fn write_vectored( &self, _: &mut Context, cx: &mut Context<'_>, buffers: &[&[u8]], absolute_position: u64, ) -> Poll<Result<usize, Kind>>

Source§

fn open(&self, _: &mut Context) -> Result<(), Kind>

Source§

fn close(&self, _: &mut Context) -> Result<(), Kind>

Source§

fn set_position( &self, _: &mut Context, current: u64, position: &Position, ) -> Result<u64, Kind>

Source§

fn clone_context(&self, _: &Context) -> Result<Context, Kind>

Source§

fn cancel_operation(&self, _: &mut Context, operation: Operation)

Detach this opening’s registration after completion, error or cancellation. This hook is idempotent and must not consume data or change the cursor. Wake and drop retired wakers outside device locks.
Source§

fn read_sync( &self, context: &mut Context, buffer: &mut [u8], absolute_position: u64, ) -> Result<usize, Kind>

Source§

fn write_sync( &self, context: &mut Context, buffer: &[u8], absolute_position: u64, ) -> Result<usize, Kind>

Source§

fn flush_sync(&self, context: &mut Context) -> Result<(), Kind>

Source§

fn control_sync( &self, context: &mut Context, command: ControlCommandIdentifier, input: &AnyByLayout, output: &mut AnyByLayout, ) -> Result<(), Kind>

Source§

fn read_until_sync( &self, context: &mut Context, buffer: &mut [u8], absolute_position: u64, delimiter: &[u8], ) -> Result<usize, Kind>

Source§

fn write_pattern_sync( &self, context: &mut Context, pattern: &[u8], count: usize, absolute_position: u64, ) -> Result<usize, Kind>

Source§

fn write_vectored_sync( &self, context: &mut Context, buffers: &[&[u8]], absolute_position: u64, ) -> Result<usize, Kind>

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> CharacterDevice for T

Source§

fn readiness(&self, interests: ReadyEvents) -> Result<Option<ReadyEvents>, Kind>

Snapshot device readiness without consuming data. Return None to use the VFS fallback, which reports the requested read/write directions allowed by the opening’s access mode. I/O on such devices may still suspend. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

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

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.