pub struct Cascade {
    pub programs: Vec<Program>,
    pub stderr: bool,
    pub use_http_path: bool,
}
Expand description

A list of helper programs to run in order to obtain credentials.

Fields

programs: Vec<Program>

The programs to run in order to obtain credentials

stderr: bool

If true, stderr is enabled when programs are run, which is the default.

use_http_path: bool

If true, http(s) urls will take their path portion into account when obtaining credentials. Default is false.

Implementations

Initialization

Return the programs to run for the current platform.

These are typically used as basis for all credential cascade invocations, with configured programs following afterwards.

Note

These defaults emulate what typical git installations may use these days, as in fact it’s a configurable which comes from installation-specific configuration files which we cannot know (or guess at best). This seems like an acceptable trade-off as helpers are ignored if they fail or are not existing.

Builder

Extend the list of programs to run programs.

If toggle is true, http(s) urls will use the path portions of the url to obtain a credential for.

Otherwise, they will only take the user name into account.

Finalize

Invoke the cascade by invoking each program with action, and configuring potential prompts with prompt options. The latter can also be used to disable the prompt entirely when setting the mode to Disable;=.

When getting credentials, all programs are asked until the credentials are complete, stopping the cascade. When storing or erasing all programs are instructed in order.

Trait Implementations

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.