pub trait ReactiveTask:
Send
+ Sync
+ Debug {
// Required methods
fn id(&self) -> &str;
fn execute<'life0, 'async_trait>(
&'life0 self,
context: TaskContext,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn task_type(&self) -> TaskType { ... }
}Required Methods§
fn id(&self) -> &str
fn execute<'life0, 'async_trait>(
&'life0 self,
context: TaskContext,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".