[−][src]Struct credent_fs::CredentialsFileLoader
Reads credentials from the user's configuration directory.
Implementations
impl CredentialsFileLoader
[src]
pub async fn load<'_>(app_name: AppName<'_>) -> Result<Option<Profile>, Error>
[src]
Returns the default profile credentials stored in the user's configuration directory.
The path differs depending on the user's operating system:
Windows
:C:\Users\%USER%\AppData\Roaming\<app>\credentials
Linux
:$XDG_CONFIG_HOME
or$HOME/.config/<app>/credentials
OS X
:$HOME/Library/Application Support/<app>/credentials
Parameters
app_name
: Name of the application whose credentials to load.
pub async fn load_profile<'_, '_>(
app_name: AppName<'_>,
profile_name: &'_ str
) -> Result<Option<Profile>, Error>
[src]
app_name: AppName<'_>,
profile_name: &'_ str
) -> Result<Option<Profile>, Error>
Returns the profile credentials stored in the user's configuration directory.
The path differs depending on the user's operating system:
Windows
:C:\Users\%USER%\AppData\Roaming\<app>\credentials
Linux
:$XDG_CONFIG_HOME
or$HOME/.config/<app>/credentials
OS X
:$HOME/Library/Application Support/<app>/credentials
Parameters
app_name
: Name of the application whose credentials to load.profile_name
: Which profile's credentials to load.
pub async fn load_all<'_>(
app_name: AppName<'_>
) -> Result<Option<Profiles>, Error>
[src]
app_name: AppName<'_>
) -> Result<Option<Profiles>, Error>
Returns all profile credentials stored in the user's configuration directory.
The path differs depending on the user's operating system:
Windows
:C:\Users\%USER%\AppData\Roaming\<app>\credentials
Linux
:$XDG_CONFIG_HOME
or$HOME/.config/<app>/credentials
OS X
:$HOME/Library/Application Support/<app>/credentials
Parameters
app_name
: Name of the application whose credentials to load.
pub async fn load_file<'_>(
credentials_path: &'_ Path
) -> Result<Profiles, Error>
[src]
credentials_path: &'_ Path
) -> Result<Profiles, Error>
Loads all credential profiles from the given file.
Parameters
credentials_path
: File to load credentials from.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for CredentialsFileLoader
impl Send for CredentialsFileLoader
impl Sync for CredentialsFileLoader
impl Unpin for CredentialsFileLoader
impl UnwindSafe for CredentialsFileLoader
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,