pub struct InMemoryAccountBackend { /* private fields */ }Expand description
In-memory account backend (default). Lost on restart — production deployments should swap in a persistent backend so refresh tokens survive a redeploy.
Implementations§
Trait Implementations§
Source§impl AccountBackend for InMemoryAccountBackend
impl AccountBackend for InMemoryAccountBackend
Source§fn upsert(&self, account: &Account)
fn upsert(&self, account: &Account)
Insert or refresh an account link. The
(provider_id, account_id)
pair is the natural key — repeated calls for the same pair
update the token bundle and updated_at on the existing row.Source§fn find_by_provider(
&self,
provider_id: &str,
account_id: &str,
) -> Option<Account>
fn find_by_provider( &self, provider_id: &str, account_id: &str, ) -> Option<Account>
Find an account by provider identity. Returns
None if the user
hasn’t linked this provider yet.Auto Trait Implementations§
impl !Freeze for InMemoryAccountBackend
impl RefUnwindSafe for InMemoryAccountBackend
impl Send for InMemoryAccountBackend
impl Sync for InMemoryAccountBackend
impl Unpin for InMemoryAccountBackend
impl UnsafeUnpin for InMemoryAccountBackend
impl UnwindSafe for InMemoryAccountBackend
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