Crate cargo_credential
source ·Expand description
Helper library for writing Cargo credential processes.
A credential process should have a struct
that implements the Credential
trait.
The main
function should be called with an instance of that struct, such as:
ⓘ
fn main() {
cargo_credential::main(MyCredential);
}
This will determine the action to perform (get/store/erase) by looking at
the CLI arguments for the first argument that does not start with -
. It
will then call the corresponding method of the trait to perform the
requested action.
Traits
Functions
- doit 🔒
- env 🔒
- Runs the credential interaction by processing the command-line and environment variables.