Skip to main content

Thread

Trait Thread 

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

    // Required method
    async fn run<T>(&mut self, task: T) -> Result<(), Error>
       where T: ThreadTask;
}
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 + ThreadDiag + NetChangeNotif where Self: 'a

The Thread 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 Thread’s own (ThreadDiag) — a Thread controller is never asked to be a Wifi one.

Required Methods§

Source

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

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> Thread for &mut T
where T: Thread,

Source§

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

Source§

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

Implementors§

Source§

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

Source§

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