Struct esp_wifi::wifi::WifiDevice

source ·
pub struct WifiDevice<'d, MODE: WifiDeviceMode> { /* private fields */ }
Expand description

A wifi device implementing smoltcp’s Device trait.

Implementations§

source§

impl<'d, MODE: WifiDeviceMode> WifiDevice<'d, MODE>

source

pub fn mac_address(&self) -> [u8; 6]

Retrieves the MAC address of the Wi-Fi device.

Trait Implementations§

source§

impl<MODE: WifiDeviceMode> Device for WifiDevice<'_, MODE>

source§

type RxToken<'a> = WifiRxToken<MODE> where Self: 'a

source§

type TxToken<'a> = WifiTxToken<MODE> where Self: 'a

source§

fn receive( &mut self, _instant: 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, _instant: Instant) -> Option<Self::TxToken<'_>>

Construct a transmit token. Read more
source§

fn capabilities(&self) -> DeviceCapabilities

Get a description of device capabilities.
source§

impl<MODE: WifiDeviceMode> Driver for WifiDevice<'_, MODE>

source§

type RxToken<'a> = WifiRxToken<MODE> where Self: 'a

A token to receive a single network packet.
source§

type TxToken<'a> = WifiTxToken<MODE> where Self: 'a

A token to transmit a single network packet.
source§

fn receive( &mut self, cx: &mut Context<'_>, ) -> 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, cx: &mut Context<'_>) -> Option<Self::TxToken<'_>>

Construct a transmit token. Read more
Get the link state. Read more
source§

fn capabilities(&self) -> Capabilities

Get a description of device capabilities.
source§

fn hardware_address(&self) -> HardwareAddress

Get the device’s hardware address. Read more

Auto Trait Implementations§

§

impl<'d, MODE> Freeze for WifiDevice<'d, MODE>
where MODE: Freeze,

§

impl<'d, MODE> RefUnwindSafe for WifiDevice<'d, MODE>
where MODE: RefUnwindSafe,

§

impl<'d, MODE> Send for WifiDevice<'d, MODE>
where MODE: Send,

§

impl<'d, MODE> Sync for WifiDevice<'d, MODE>
where MODE: Sync,

§

impl<'d, MODE> Unpin for WifiDevice<'d, MODE>
where MODE: Unpin,

§

impl<'d, MODE> !UnwindSafe for WifiDevice<'d, MODE>

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.