/
View dependency graph
Depends on
- dh-cargo (dh-sequence-cargo)
- rust-anyhow (librust-anyhow-1+default-dev)
- rust-libc (librust-libc-0.2+default-dev)
- cargo, debhelper-compat, librust-serde-1+default-dev, librust-serde-1+derive-dev, librust-serde-json-1+default-dev, librust-thiserror-2+default-dev, librust-time-0.3+default-dev, librust-time-0.3+formatting-dev, librust-time-0.3+parsing-dev, librust-time-0.3+serde-dev, libstd-rust-dev, rustc
README (full)
cargo-credential
This package is a library to assist writing a Cargo credential helper, which provides an interface to store tokens for authorizing access to a registry such as https://crates.io/.
Documentation about credential processes may be found at https://doc.rust-lang.org/nightly/cargo/reference/credential-provider-protocol.html
Example implementations may be found at https://github.com/rust-lang/cargo/tree/master/credential
This crate is maintained by the Cargo team for use by the wider ecosystem. This crate follows semver compatibility for its APIs.
Usage
Create a Cargo project with this as a dependency:
# Add this to your Cargo.toml:
[dependencies]
cargo-credential = "0.4"
And then include a main.rs binary which implements the Credential trait, and calls
the main function which will call the appropriate method of the trait:
// src/main.rs
use cargo_credential::{Credential, Error};
struct MyCredential;
impl Credential for MyCredential {
/// implement trait methods here...
}
fn main() {
cargo_credential::main(MyCredential);
}
| dir | debian/ |
| dir | examples/ |
| dir | src/ |
| dir | tests/ |
| file | .cargo_vcs_info.json |
| file | Cargo.lock |
| file | Cargo.toml |
| file | Cargo.toml.orig |
| file | LICENSE-APACHE |
| file | LICENSE-MIT |
| file | README.md |