pub trait UserTask {
// Required method
async fn run<S, N>(&mut self, net_stack: S, netif: N) -> Result<(), Error>
where S: NetStack,
N: NetifDiag + NetChangeNotif;
}Expand description
A trait representing a user task that needs access to the operational network interface (Netif and net stack) to perform its work.
Note that the task would be started only when rs-matter
brings up the operational interface (eth, wifi or thread)
and if the interface goes down, the user task would be stopped.
Upon re-connection, the task would be started again.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".