pub struct InMemoryBackend { /* private fields */ }Expand description
In-memory backend for unit tests.
Implementations§
Trait Implementations§
Source§impl ApiKeyBackend for InMemoryBackend
impl ApiKeyBackend for InMemoryBackend
Source§fn store(
&self,
record: &ApiKeyRecord,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '_>>
fn store( &self, record: &ApiKeyRecord, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '_>>
Store a new key record. Read more
Source§fn lookup(
&self,
key_id: &str,
) -> Pin<Box<dyn Future<Output = Result<Option<ApiKeyRecord>>> + Send + '_>>
fn lookup( &self, key_id: &str, ) -> Pin<Box<dyn Future<Output = Result<Option<ApiKeyRecord>>> + Send + '_>>
Look up a key by ULID. Returns
None if not found. Read moreSource§fn revoke(
&self,
key_id: &str,
revoked_at: &str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '_>>
fn revoke( &self, key_id: &str, revoked_at: &str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '_>>
Set
revoked_at on a key. Read moreSource§fn list(
&self,
tenant_id: &str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ApiKeyRecord>>> + Send + '_>>
fn list( &self, tenant_id: &str, ) -> Pin<Box<dyn Future<Output = Result<Vec<ApiKeyRecord>>> + Send + '_>>
List all keys for a tenant. Read more
Auto Trait Implementations§
impl !Freeze for InMemoryBackend
impl RefUnwindSafe for InMemoryBackend
impl Send for InMemoryBackend
impl Sync for InMemoryBackend
impl Unpin for InMemoryBackend
impl UnsafeUnpin for InMemoryBackend
impl UnwindSafe for InMemoryBackend
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