pub struct CredentialStore { /* private fields */ }Expand description
Credential store for managing multiple API keys
Implementations§
Source§impl CredentialStore
impl CredentialStore
Sourcepub fn add(&mut self, server_id: impl Into<String>, auth: AuthConfig)
pub fn add(&mut self, server_id: impl Into<String>, auth: AuthConfig)
Add credentials for a server
Sourcepub fn get(&self, server_id: &str) -> Option<&AuthConfig>
pub fn get(&self, server_id: &str) -> Option<&AuthConfig>
Get credentials for a server
Sourcepub fn remove(&mut self, server_id: &str) -> Option<AuthConfig>
pub fn remove(&mut self, server_id: &str) -> Option<AuthConfig>
Remove credentials for a server
Sourcepub fn server_ids(&self) -> Vec<&String>
pub fn server_ids(&self) -> Vec<&String>
List all server IDs with stored credentials
Trait Implementations§
Source§impl Clone for CredentialStore
impl Clone for CredentialStore
Source§fn clone(&self) -> CredentialStore
fn clone(&self) -> CredentialStore
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CredentialStore
impl Debug for CredentialStore
Source§impl Default for CredentialStore
impl Default for CredentialStore
Source§fn default() -> CredentialStore
fn default() -> CredentialStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CredentialStore
impl RefUnwindSafe for CredentialStore
impl Send for CredentialStore
impl Sync for CredentialStore
impl Unpin for CredentialStore
impl UnwindSafe for CredentialStore
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