use super::Error;
use async_trait::async_trait;
use pbbson::Model;
use std::time::Duration;

#[async_trait]
pub trait SessionStore<B: ToString>: Sync + Send {
    async fn create(&self, bucket: B, model: Model, maybe_expires: Option<Duration>) -> Result<Model, Error>;
    async fn find(&self, bucket: B, id: &str) -> Result<Model, Error>;
}
