#[non_exhaustive]pub enum TransportAuth {
Default,
UsernamePassword {
username: String,
password: String,
},
Token {
username: Option<String>,
token: String,
},
SshKey {
username: String,
public_key: Option<PathBuf>,
private_key: PathBuf,
passphrase: Option<String>,
},
SshAgent {
username: String,
},
}Expand description
Supported repository transport authentication strategies.
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.
Default
Use default environment-driven authentication.
UsernamePassword
Use a username/password combination.
Token
Use an HTTP token.
SshKey
Use explicit SSH key material.
Fields
SshAgent
Use the local SSH agent.
Trait Implementations§
Source§impl Clone for TransportAuth
impl Clone for TransportAuth
Source§fn clone(&self) -> TransportAuth
fn clone(&self) -> TransportAuth
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 moreSource§impl Debug for TransportAuth
impl Debug for TransportAuth
Source§impl Default for TransportAuth
impl Default for TransportAuth
Source§fn default() -> TransportAuth
fn default() -> TransportAuth
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TransportAuth
impl RefUnwindSafe for TransportAuth
impl Send for TransportAuth
impl Sync for TransportAuth
impl Unpin for TransportAuth
impl UnsafeUnpin for TransportAuth
impl UnwindSafe for TransportAuth
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