Crate b2creds[−][src]
This crate contains the logic to read B2 credentials following the same logic used by the B2 CLI.
let creds = b2creds::Credentials::default().unwrap(); println!("Key ID: {} Key: {}", creds.application_key_id, creds.application_key);
Look at the Credentials::default
, Credentials::from_env
. and
Credentials::from_file
to understand how to parse B2 credentials.
Structs
Credentials | Holds the application key id and application key which make up your credentials |
Enums
CredentialsError | Error enum for crate functions. Used for all |
Functions
default_creds_file | Returns the default credentials file path. |