pub trait Task<T: 'static> {
// Required method
fn handler(&mut self, ctx: T) -> impl Future<Output = ()>;
// Provided method
fn start(self) -> TaskHandler<T>
where Self: Sized + 'static { ... }
}
Required Methods§
Provided Methods§
Sourcefn start(self) -> TaskHandler<T>where
Self: Sized + 'static,
fn start(self) -> TaskHandler<T>where
Self: Sized + 'static,
Start main handler loop.
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.