Struct InMemoryCredentialService
pub struct InMemoryCredentialService { /* private fields */ }Expand description
In-memory credential service for testing and development.
Implementations§
§impl InMemoryCredentialService
impl InMemoryCredentialService
pub fn new() -> InMemoryCredentialService
pub fn new() -> InMemoryCredentialService
Create a new empty in-memory credential service.
Trait Implementations§
§impl CredentialService for InMemoryCredentialService
impl CredentialService for InMemoryCredentialService
§fn load_credential<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<AuthCredential>, CredentialError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryCredentialService: 'async_trait,
fn load_credential<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<AuthCredential>, CredentialError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryCredentialService: 'async_trait,
Load a credential by key. Returns
None if not found.§fn save_credential<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
credential: AuthCredential,
) -> Pin<Box<dyn Future<Output = Result<(), CredentialError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryCredentialService: 'async_trait,
fn save_credential<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
credential: AuthCredential,
) -> Pin<Box<dyn Future<Output = Result<(), CredentialError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryCredentialService: 'async_trait,
Save a credential under the given key.
§fn delete_credential<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CredentialError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryCredentialService: 'async_trait,
fn delete_credential<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CredentialError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryCredentialService: 'async_trait,
Delete a credential by key.
§impl Default for InMemoryCredentialService
impl Default for InMemoryCredentialService
§fn default() -> InMemoryCredentialService
fn default() -> InMemoryCredentialService
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InMemoryCredentialService
impl !RefUnwindSafe for InMemoryCredentialService
impl Send for InMemoryCredentialService
impl Sync for InMemoryCredentialService
impl Unpin for InMemoryCredentialService
impl UnwindSafe for InMemoryCredentialService
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