Enum cargo::ops::RegistryCredentialConfig
source · pub enum RegistryCredentialConfig {
None,
Token(Secret<String>),
Process(Vec<PathAndArgs>),
AsymmetricKey((Secret<String>, Option<String>)),
}
Expand description
Registry settings loaded from config files.
This is loaded based on the --registry
flag and the config settings.
Variants§
None
Token(Secret<String>)
The authentication token.
Process(Vec<PathAndArgs>)
Process used for fetching a token.
AsymmetricKey((Secret<String>, Option<String>))
Secret Key and subject for Asymmetric tokens.
Implementations§
source§impl RegistryCredentialConfig
impl RegistryCredentialConfig
sourcepub fn is_asymmetric_key(&self) -> bool
pub fn is_asymmetric_key(&self) -> bool
Returns true
if the credential is AsymmetricKey
.
pub fn as_token(&self) -> Option<Secret<&str>>
pub fn as_process(&self) -> Option<&Vec<PathAndArgs>>
pub fn as_asymmetric_key(&self) -> Option<&(Secret<String>, Option<String>)>
Trait Implementations§
source§impl Debug for RegistryCredentialConfig
impl Debug for RegistryCredentialConfig
source§impl PartialEq for RegistryCredentialConfig
impl PartialEq for RegistryCredentialConfig
source§fn eq(&self, other: &RegistryCredentialConfig) -> bool
fn eq(&self, other: &RegistryCredentialConfig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for RegistryCredentialConfig
Auto Trait Implementations§
impl RefUnwindSafe for RegistryCredentialConfig
impl Send for RegistryCredentialConfig
impl Sync for RegistryCredentialConfig
impl Unpin for RegistryCredentialConfig
impl UnwindSafe for RegistryCredentialConfig
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