Skip to main content

Task

Trait Task 

Source
pub trait Task: Sized {
    // Required methods
    fn from_description(
        task_type: impl AsRef<str>,
        description: impl AsRef<str>,
    ) -> 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: impl AsRef<str>, description: impl AsRef<str>, ) -> 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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§