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
impl StructuralPartialEq for RegistryCredentialConfig
Auto Trait Implementations§
impl Freeze for RegistryCredentialConfig
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§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>,
§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: 48 bytes
Size for each variant:
None
: 0 bytesToken
: 32 bytesProcess
: 32 bytesAsymmetricKey
: 48 bytes