[−][src]Struct credentials::Secretfile
A basic interface for loading a Secretfile
and listing the various
variables and files contained inside.
Implementations
impl Secretfile
[src]
pub fn read(read: &mut dyn Read) -> Result<Secretfile>
[src]
Read in from an io::Read
object.
pub fn from_path<P: AsRef<Path>>(path: P) -> Result<Secretfile>
[src]
Load the Secretfile
at the specified path.
pub fn set_built_in(secretfile: Option<Secretfile>)
[src]
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
.
pub fn default() -> Result<Secretfile>
[src]
Load the default Secretfile
. This is normally Secretfile
in the
current working directory, but it can be overridden using
Secretfile::set_built_in
.
pub fn vars(&self) -> SecretfileKeys<'_>ⓘNotable traits for SecretfileKeys<'a>
impl<'a> Iterator for SecretfileKeys<'a> type Item = &'a String;
[src]
Notable traits for SecretfileKeys<'a>
impl<'a> Iterator for SecretfileKeys<'a> type Item = &'a String;
Return an iterator over the environment variables listed in this file.
pub fn files(&self) -> SecretfileKeys<'_>ⓘNotable traits for SecretfileKeys<'a>
impl<'a> Iterator for SecretfileKeys<'a> type Item = &'a String;
[src]
Notable traits for SecretfileKeys<'a>
impl<'a> Iterator for SecretfileKeys<'a> type Item = &'a String;
Return an iterator over the credential files listed in this file.
Trait Implementations
impl Clone for Secretfile
[src]
fn clone(&self) -> Secretfile
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Secretfile
[src]
impl FromStr for Secretfile
[src]
Auto Trait Implementations
impl RefUnwindSafe for Secretfile
impl Send for Secretfile
impl Sync for Secretfile
impl Unpin for Secretfile
impl UnwindSafe for Secretfile
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<'a, T> TryFrom<&'a str> for T where
T: FromStr,
T: FromStr,
type Err = <T as FromStr>::Err
fn try_from(string: &'a str) -> Result<T, <T as TryFrom<&'a str>>::Err>
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,