#[non_exhaustive]pub struct GitCredentialHelper {
pub config_args: Vec<String>,
pub env: Vec<(String, Secret)>,
}Expand description
The pieces needed to authenticate a git HTTPS operation with a Credential
without putting the secret in argv. See git_credential_helper.
#[non_exhaustive]: only git_credential_helper constructs it, so new fields
can be added without breaking callers (who read the fields, never build it).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.config_args: Vec<String>-c key=value global options to place before the git subcommand. They
reference the secret only by environment-variable name, never by value.
env: Vec<(String, Secret)>Environment variables (name → value) to set on the command. This is where the actual secret lives — in the child’s environment, not its arguments.
Trait Implementations§
Source§impl Clone for GitCredentialHelper
impl Clone for GitCredentialHelper
Source§fn clone(&self) -> GitCredentialHelper
fn clone(&self) -> GitCredentialHelper
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GitCredentialHelper
impl RefUnwindSafe for GitCredentialHelper
impl Send for GitCredentialHelper
impl Sync for GitCredentialHelper
impl Unpin for GitCredentialHelper
impl UnsafeUnpin for GitCredentialHelper
impl UnwindSafe for GitCredentialHelper
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more