pub trait WireSpawn: Clone {
type Error;
type Info;
// Required method
fn info(&self) -> &Self::Info;
}
Expand description
A trait to assist in spawning a handler task
This trait is weird, and mostly exists to abstract over how “normal” async executors like tokio spawn tasks, taking a future, and how unusual async executors like embassy spawn tasks, taking a task token that maps to static storage
Required Associated Types§
Sourcetype Error
type Error
An error type returned when spawning fails. If this cannot happen,
Infallible
can be used.
Required Methods§
Sourcefn info(&self) -> &Self::Info
fn info(&self) -> &Self::Info
Retrieve Self::Info
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.