pub struct Credential { /* private fields */ }Expand description
Implementations§
Source§impl Credential
impl Credential
Sourcepub fn token(secret: impl Into<Secret>) -> Self
pub fn token(secret: impl Into<Secret>) -> Self
A bare token/secret with no username (the forge case, and git HTTPS where
any username is accepted). For git HTTPS a default username
(x-access-token, which GitHub/GitLab personal-access tokens accept) is
supplied automatically; use userpass if your host
needs a specific one. Forge token-env injection ignores the username.
Sourcepub fn userpass(username: impl Into<String>, secret: impl Into<Secret>) -> Self
pub fn userpass(username: impl Into<String>, secret: impl Into<Secret>) -> Self
A username paired with a secret (git HTTPS user/password, where the
password is typically a personal-access token). The username is used only
for git HTTPS; forge token-env injection (GH_TOKEN/GITLAB_TOKEN)
uses only the secret and ignores the username.
Trait Implementations§
Source§impl Clone for Credential
impl Clone for Credential
Source§fn clone(&self) -> Credential
fn clone(&self) -> Credential
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 Credential
impl RefUnwindSafe for Credential
impl Send for Credential
impl Sync for Credential
impl Unpin for Credential
impl UnsafeUnpin for Credential
impl UnwindSafe for Credential
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