pub struct InMemoryOAuthStore { /* private fields */ }Expand description
OAuth connections and pending flows kept in memory, for tests and hosts without a database. Same upsert rules as the daemon’s SQLite store.
Implementations§
Trait Implementations§
Source§impl Default for InMemoryOAuthStore
impl Default for InMemoryOAuthStore
Source§impl OAuthStore for InMemoryOAuthStore
impl OAuthStore for InMemoryOAuthStore
Source§fn save_oauth_connection<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 OAuthConnection,
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_oauth_connection<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 OAuthConnection,
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Save an OAuth connection. Returns the connection ID.
Source§fn save_pending_oauth_flow<'life0, 'life1, 'async_trait>(
&'life0 self,
flow: &'life1 PendingOAuthFlow,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_pending_oauth_flow<'life0, 'life1, 'async_trait>(
&'life0 self,
flow: &'life1 PendingOAuthFlow,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Save or replace a pending interactive OAuth flow.
Source§fn get_oauth_connection<'life0, 'life1, 'async_trait>(
&'life0 self,
service: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<OAuthConnection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_oauth_connection<'life0, 'life1, 'async_trait>(
&'life0 self,
service: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<OAuthConnection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get an OAuth connection by service name.
Source§fn list_oauth_connections<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<OAuthConnection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_oauth_connections<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<OAuthConnection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List all OAuth connections.
Source§fn update_oauth_account_id<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
service: &'life1 str,
account_id: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_oauth_account_id<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
service: &'life1 str,
account_id: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Persist or clear the verified remote account bound to an OAuth service.
Source§fn get_pending_oauth_flow<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<PendingOAuthFlow>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_pending_oauth_flow<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<PendingOAuthFlow>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a pending OAuth flow by state parameter.
Source§fn list_pending_oauth_flows<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<PendingOAuthFlow>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_pending_oauth_flows<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<PendingOAuthFlow>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List all pending OAuth flows.
Source§fn delete_oauth_connection<'life0, 'life1, 'async_trait>(
&'life0 self,
service: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_oauth_connection<'life0, 'life1, 'async_trait>(
&'life0 self,
service: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete an OAuth connection by service name.
Source§fn delete_pending_oauth_flow<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_pending_oauth_flow<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a pending OAuth flow by state parameter.
Source§fn update_oauth_token_expiry<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
service: &'life1 str,
expires_at: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_oauth_token_expiry<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
service: &'life1 str,
expires_at: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Update token expiry for an OAuth connection.
Auto Trait Implementations§
impl !Freeze for InMemoryOAuthStore
impl Forget for InMemoryOAuthStore
impl Move for InMemoryOAuthStore
impl RefUnwindSafe for InMemoryOAuthStorewhere
Mutex<InMemoryOAuth>: RefUnwindSafe,
impl Send for InMemoryOAuthStore
impl Sync for InMemoryOAuthStore
impl Unpin for InMemoryOAuthStore
impl UnsafeUnpin for InMemoryOAuthStorewhere
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const LeafNode<String, OAuthConnection> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, OAuthConnection)>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<(String, PendingOAuthFlow)>: UnsafeUnpin,
impl UnwindSafe for InMemoryOAuthStorewhere
Mutex<InMemoryOAuth>: UnwindSafe,
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