use std::time::Duration;
use crate::LockError;
pub trait LockStore: Send + Sync {
fn save(&self, resource: &str, token: &str, ttl: Option<Duration>) -> Result<(), LockError>;
fn delete(&self, resource: &str, token: &str) -> Result<(), LockError>;
fn exists(&self, resource: &str, token: &str) -> Result<bool, LockError>;
fn put_off_expiration(
&self,
resource: &str,
token: &str,
ttl: Option<Duration>,
) -> Result<(), LockError>;
}