Trait agent_tk::delegation::Task

source ·
pub trait Task: Sized {
    // Required methods
    fn from_description(
        task_type: &String,
        description: &String,
    ) -> Result<Self>;
    fn task_type(&self) -> &str;
    fn to_description(&self) -> String;
    fn task_id(&self) -> Uuid;
}
Expand description

Base trait for representing tasks in the delegation

Required Methods§

source

fn from_description(task_type: &String, description: &String) -> Result<Self>

Create a task from a text description (aka json string…)

source

fn task_type(&self) -> &str

The type of the task (tst, goalspec…)

source

fn to_description(&self) -> String

Convert into a string representation

source

fn task_id(&self) -> Uuid

An UUID for the task

Object Safety§

This trait is not object safe.

Implementors§