rustauth-core 0.2.0

Core types and primitives for RustAuth.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::options::{BackgroundTaskFuture, BackgroundTaskRunner};

/// Spawns background work on the Tokio runtime.
#[derive(Debug, Clone, Copy, Default)]
pub struct TokioBackgroundTaskRunner;

impl BackgroundTaskRunner for TokioBackgroundTaskRunner {
    fn spawn(&self, task: BackgroundTaskFuture) {
        tokio::spawn(task);
    }
}