Struct credentials::Client
[−]
[src]
pub struct Client { /* fields omitted */ }
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.
Methods
impl Client
[src]
fn new(options: Options) -> Result<Client>
Create a new client using the specified options.
fn default() -> Result<Client>
Create a new client using the default options.
fn with_secretfile(secretfile: Secretfile) -> Result<Client>
Create a new client using the specified Secretfile
.
fn secretfile(&self) -> &Secretfile
Provide access to a copy of the Secretfile we're using.
fn var<S: AsRef<str>>(&mut self, name: S) -> Result<String>
Fetch the value of an environment-variable-style credential.
fn file<S: AsRef<Path>>(&mut self, path: S) -> Result<String>
Fetch the value of a file-style credential.