pub struct FileStorage;Expand description
Unencrypted file-based credential storage.
Stores each credential as JSON at
<config-base>/<app>/credentials/<provider>-<env>.json, where <app> is the
key’s app_id (or provider when app_id is empty) and <config-base> is
resolved by config_base_dir. On Unix the file is created 0600 and the
parent directory is best-effort restricted to 0700.
Credentials are written in clear text, so prefer the system keychain where one is available.
Implementations§
Source§impl FileStorage
impl FileStorage
Trait Implementations§
Source§impl Clone for FileStorage
impl Clone for FileStorage
Source§fn clone(&self) -> FileStorage
fn clone(&self) -> FileStorage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for FileStorage
Source§impl CredentialStorage for FileStorage
impl CredentialStorage for FileStorage
Source§fn load<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 CredentialKey<'life2>,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn load<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 CredentialKey<'life2>,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn save<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
key: &'life1 CredentialKey<'life2>,
value: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn save<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
key: &'life1 CredentialKey<'life2>,
value: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 CredentialKey<'life2>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 CredentialKey<'life2>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Removes the blob for
key. Best-effort: absence is not an error.Source§fn list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists environment names with stored credentials, if the backend supports
enumeration. The default returns an empty list (the keychain cannot be
enumerated by service prefix). Read more
Source§impl Debug for FileStorage
impl Debug for FileStorage
Source§impl Default for FileStorage
impl Default for FileStorage
Source§fn default() -> FileStorage
fn default() -> FileStorage
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FileStorage
impl RefUnwindSafe for FileStorage
impl Send for FileStorage
impl Sync for FileStorage
impl Unpin for FileStorage
impl UnsafeUnpin for FileStorage
impl UnwindSafe for FileStorage
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