Struct credentials::Secretfile
[−]
[src]
pub struct Secretfile { /* fields omitted */ }
A basic interface for loading a Secretfile
and listing the various
variables and files contained inside.
Methods
impl Secretfile
[src]
fn read(read: &mut Read) -> Result<Secretfile>
Read in from an io::Read
object.
fn from_str<S: AsRef<str>>(s: S) -> Result<Secretfile>
Read a Secretfile
from a string.
fn from_path<P: AsRef<Path>>(path: P) -> Result<Secretfile>
Load the Secretfile
at the specified path.
fn set_built_in(secretfile: Option<Secretfile>)
Set a built-in Secretfile
. This is intended for command-line
applications called directly by users, which do not normally have a
Secretfile
in the current directory, and which probably want to ignore
one if it exists.
This must be called before credentials::var
.
fn default() -> Result<Secretfile>
Load the default Secretfile
. This is normally Secretfile
in the
current working directory, but it can be overridden using
Secretfile::set_built_in
.
fn vars(&self) -> SecretfileKeys
Return an iterator over the environment variables listed in this file.
fn files(&self) -> SecretfileKeys
Return an iterator over the credential files listed in this file.
Trait Implementations
impl Debug for Secretfile
[src]
impl Clone for Secretfile
[src]
fn clone(&self) -> Secretfile
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more