Module task

Module task 

Source
Expand description

Task system for htms.

Defines a Task abstraction wrapping a future that produces a String. Useful for scheduling or executing asynchronous jobs identified by an ID.

§Example

use htms_core::task::{Task, TaskFuture};
use std::future;

let task = Task::new("hello", future::ready("world".to_string()));

Structs§

Task
Represents an asynchronous task with an identifier and a future.

Type Aliases§

TaskFuture
Boxed future returning a String.