pub trait DynTask: Send + Sync {
// Required methods
fn task_id(&self) -> &TaskId;
fn config(&self) -> &TaskConfig;
fn execute(&self, args: &SerializedArguments) -> RustvelloResult<String>;
}Expand description
Type-erased task interface for the TaskRegistry.
Every T: Task automatically implements DynTask via a blanket impl.
The registry stores Arc<dyn DynTask>, which handles serialization
and deserialization internally.
Required Methods§
Sourcefn config(&self) -> &TaskConfig
fn config(&self) -> &TaskConfig
The task’s configuration.
Sourcefn execute(&self, args: &SerializedArguments) -> RustvelloResult<String>
fn execute(&self, args: &SerializedArguments) -> RustvelloResult<String>
Execute with SerializedArguments, returns serialized JSON result.