Function steward::run_once

source ·
pub async fn run_once<Fun, Fut, Ok, Err>(
    msg: impl Display,
    f: Fun,
) -> Result<Ok, Err>
where Fun: FnOnce() -> Fut, Fut: Future<Output = Result<Ok, Err>>,
Expand description

A function that prints a headline of a task and runs the task (FnOnce).

steward::run("Stopping server", || async { process.stop().await }).await