Struct git2::CredentialHelper
source · [−]Expand description
Management of the gitcredentials(7) interface.
Fields
username: Option<String>
A public field representing the currently discovered username from configuration.
Implementations
sourceimpl CredentialHelper
impl CredentialHelper
sourcepub fn new(url: &str) -> CredentialHelper
pub fn new(url: &str) -> CredentialHelper
Create a new credential helper object which will be used to probe git’s local credential configuration.
The url specified is the namespace on which this will query credentials. Invalid urls are currently ignored.
sourcepub fn username(&mut self, username: Option<&str>) -> &mut CredentialHelper
pub fn username(&mut self, username: Option<&str>) -> &mut CredentialHelper
Set the username that this credential helper will query with.
By default the username is None
.
sourcepub fn config(&mut self, config: &Config) -> &mut CredentialHelper
pub fn config(&mut self, config: &Config) -> &mut CredentialHelper
Query the specified configuration object to discover commands to execute, usernames to query, etc.
Auto Trait Implementations
impl RefUnwindSafe for CredentialHelper
impl Send for CredentialHelper
impl Sync for CredentialHelper
impl Unpin for CredentialHelper
impl UnwindSafe for CredentialHelper
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more