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