Skip to main content

Wifi

Trait Wifi 

Source
pub trait Wifi {
    type NetCtl<'a>: NetCtl + WifiDiag + NetChangeNotif
       where Self: 'a;

    // Required method
    async fn run<T>(&mut self, task: T) -> Result<(), Error>
       where T: WifiTask;
}
Expand description

A trait for running a task within a context where the wireless interface is initialized and operable

Required Associated Types§

Source

type NetCtl<'a>: NetCtl + WifiDiag + NetChangeNotif where Self: 'a

The Wifi network controller type this driver produces in its operational phase. Naming it here lets the commissioning and operational handler chains be built with the SAME WirelessNetCtl<Self::NetCtl<'_>> net-ctl type, yielding a single handler-chain monomorphization. The bound is Wifi’s own (WifiDiag) — a Wifi controller is never asked to be a Thread one.

Required Methods§

Source

async fn run<T>(&mut self, task: T) -> Result<(), Error>
where T: WifiTask,

Setup the radio to operate in wireless (Wifi or Thread) mode and run the given task.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> Wifi for &mut T
where T: Wifi,

Source§

type NetCtl<'a> = <T as Wifi>::NetCtl<'a> where Self: 'a

Source§

fn run<A>(&mut self, task: A) -> impl Future<Output = Result<(), Error>>
where A: WifiTask,

Implementors§

Source§

impl<S, N, C, M, P> Wifi for PreexistingWireless<S, N, C, M, P>

Source§

type NetCtl<'a> = &'a C where Self: 'a