pub async fn create_with_stop<F, Fut, S, SFut>(
func: F,
stop_callback: S,
) -> Result<()>Expand description
ยงcreate_with_stop
#[tokio::main]
async fn main() {
sssd::create_with_stop(your_async_func, stop_callback).await.unwrap()
}
async fn your_async_func() -> anyhow::Result<()> {
// ...
}
async fn stop_callback() -> anyhow::Result<()> {
// ...
}