#[non_exhaustive]pub struct Interface<'d> { /* private fields */ }Available on crate feature
wifi only.Expand description
Wi-Fi interface.
Implementations§
Source§impl Interface<'_>
impl Interface<'_>
Sourcepub fn mac_address(&self) -> [u8; 6]
pub fn mac_address(&self) -> [u8; 6]
Retrieves the MAC address of the Wi-Fi device.
§Example
let (_controller, interfaces) = esp_radio::wifi::new(peripherals.WIFI, Default::default())?;
let station = interfaces.station;
let mac = station.mac_address();
println!("Station MAC: {:02x?}", mac);Trait Implementations§
Source§impl Driver for Interface<'_>
impl Driver for Interface<'_>
Source§fn receive(
&mut self,
cx: &mut Context<'_>,
) -> Option<(Self::RxToken<'_>, Self::TxToken<'_>)>
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<'_>>
fn transmit(&mut self, cx: &mut Context<'_>) -> Option<Self::TxToken<'_>>
Construct a transmit token. Read more
Source§fn link_state(&mut self, cx: &mut Context<'_>) -> LinkState
fn link_state(&mut self, cx: &mut Context<'_>) -> LinkState
Get the link state. Read more
Source§fn capabilities(&self) -> Capabilities
fn capabilities(&self) -> Capabilities
Get a description of device capabilities.
Source§fn hardware_address(&self) -> HardwareAddress
fn hardware_address(&self) -> HardwareAddress
Get the device’s hardware address. Read more
impl<'d> Copy for Interface<'d>
impl<'d> Eq for Interface<'d>
impl<'d> StructuralPartialEq for Interface<'d>
Auto Trait Implementations§
impl<'d> Freeze for Interface<'d>
impl<'d> RefUnwindSafe for Interface<'d>
impl<'d> Send for Interface<'d>
impl<'d> Sync for Interface<'d>
impl<'d> Unpin for Interface<'d>
impl<'d> UnwindSafe for Interface<'d>
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)