#[non_exhaustive]pub enum Auth {
Anonymous,
Https {
username: String,
password: String,
},
Ssh(SshAuth),
}Expand description
What to present to a git host.
Not Debug-derived: the HTTPS password is a token and the SSH command can
carry anything the caller put in it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Anonymous
Nothing at all — a public repository over HTTPS.
Https
HTTP basic authentication, which is how every host takes a token.
The token goes in password. The username half is filler that every
host in this crate’s remit ignores — x-access-token is what
Credential::token puts there.
Fields
Ssh(SshAuth)
SSH, carried by the ssh program.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Auth
impl RefUnwindSafe for Auth
impl Send for Auth
impl Sync for Auth
impl Unpin for Auth
impl UnsafeUnpin for Auth
impl UnwindSafe for Auth
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