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<RegistryCredentialConfig> for RegistryCredentialConfig
impl PartialEq<RegistryCredentialConfig> 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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 56 bytes
Size for each variant:
None
: 0 bytesToken
: 24 bytesProcess
: 24 bytesAsymmetricKey
: 48 bytes