Git Credential
A Rust library that provides types that help to implement git-credential helpers.
Usage
Add this to your Cargo.toml
:
[]
= "*"
This crates provides types that are able to parse input and produce output in the format described in git-credential[1] .
The following shows an example on how create a GitCredential
struct
from an input, modify it and write it back to an output:
use GitCredential;
let input = "username=me\npassword=%sec&ret!\n\n".as_bytes;
let mut output: = Vec new;
let mut g = from_reader.unwrap;
assert_eq!;
assert_eq!;
g.username = Some;
g.password = Some;
g.to_writer.unwrap;
assert_eq!
See the API documentation for more details.
License
Rand is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT, and COPYRIGHT for details.