pub struct InMemoryTokenStore { /* private fields */ }Expand description
内存 token 存储(进程重启即丢失)。适合测试 / 短期调用 / 不落盘场景。
Implementations§
Trait Implementations§
Source§impl Default for InMemoryTokenStore
impl Default for InMemoryTokenStore
Source§impl TokenStore for InMemoryTokenStore
impl TokenStore for InMemoryTokenStore
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
tokens: &'life1 TokenSet,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<TokenSet>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl !Freeze for InMemoryTokenStore
impl RefUnwindSafe for InMemoryTokenStore
impl Send for InMemoryTokenStore
impl Sync for InMemoryTokenStore
impl Unpin for InMemoryTokenStore
impl UnsafeUnpin for InMemoryTokenStore
impl UnwindSafe for InMemoryTokenStore
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