[][src]Struct credentials::Secretfile

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]

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.

Important traits for SecretfileKeys<'a>
pub fn vars(&self) -> SecretfileKeys[src]

Return an iterator over the environment variables listed in this file.

Important traits for SecretfileKeys<'a>
pub fn files(&self) -> SecretfileKeys[src]

Return an iterator over the credential files listed in this file.

Trait Implementations

impl Clone for Secretfile[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Secretfile[src]

impl FromStr for Secretfile[src]

type Err = Error

The associated error which can be returned from parsing.

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<'a, T> TryFrom<&'a str> for T where
    T: FromStr

type Err = <T as FromStr>::Err

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err