pub struct SqliteNonceStorage { /* private fields */ }Expand description
A sqlx-based implementation of NonceStorage for nonce-auth
Implementations§
Trait Implementations§
Source§impl NonceStorage for SqliteNonceStorage
impl NonceStorage for SqliteNonceStorage
Source§fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
nonce: &'life1 str,
context: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<Option<NonceEntry>, NonceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
nonce: &'life1 str,
context: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<Option<NonceEntry>, NonceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Retrieves a nonce entry if it exists. Read more
Source§fn set<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
nonce: &'life1 str,
context: Option<&'life2 str>,
ttl: Duration,
) -> Pin<Box<dyn Future<Output = Result<(), NonceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
nonce: &'life1 str,
context: Option<&'life2 str>,
ttl: Duration,
) -> Pin<Box<dyn Future<Output = Result<(), NonceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Stores a new nonce with expiration time. Read more
Source§fn exists<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
nonce: &'life1 str,
context: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<bool, NonceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn exists<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
nonce: &'life1 str,
context: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<bool, NonceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Checks if a nonce exists without retrieving it. Read more
Source§fn cleanup_expired<'life0, 'async_trait>(
&'life0 self,
current_time: i64,
) -> Pin<Box<dyn Future<Output = Result<usize, NonceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn cleanup_expired<'life0, 'async_trait>(
&'life0 self,
current_time: i64,
) -> Pin<Box<dyn Future<Output = Result<usize, NonceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Removes all expired nonces from storage. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for SqliteNonceStorage
impl !UnwindSafe for SqliteNonceStorage
impl Freeze for SqliteNonceStorage
impl Send for SqliteNonceStorage
impl Sync for SqliteNonceStorage
impl Unpin for SqliteNonceStorage
impl UnsafeUnpin for SqliteNonceStorage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request