Crate credentials [] [src]

Access secure credentials at runtime with multiple backends.

For more information, see the homepage.

use credentials;
use std::env;

env::set_var("PASSWORD", "secret");
assert_eq!("secret", credentials::var("PASSWORD").unwrap());

Structs

Client

A client which fetches secrets. Under normal circumstances, it's usually easier to use the static credentials::var and credentials::file methods instead, but you may need to use this to customize behavior.

Error

The Error type.

Options

Options which can be passed to Client::new.

Secretfile

A basic interface for loading a Secretfile and listing the various variables and files contained inside.

SecretfileKeys

An iterator over the keys mentioned in a Secretfile.

Enums

ErrorKind

The kind of an error.

Traits

ResultExt

Additional methods for Result, for easy interaction with this crate.

Functions

file

Fetch the value of a file-style credential.

var

Fetch the value of an environment-variable-style credential.

Type Definitions

Result

Convenient wrapper around std::Result.