Enum cargo_credential::Error
source · #[non_exhaustive]pub enum Error {
UrlNotSupported,
NotFound,
OperationNotSupported,
Other(Box<dyn StdError + Sync + Send>),
Unknown,
}
Expand description
Credential provider error type.
UrlNotSupported
and NotFound
errors both cause Cargo
to attempt another provider, if one is available. The other
variants are fatal.
Note: Do not add a tuple variant, as it cannot be serialized.
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.
UrlNotSupported
Registry URL is not supported. This should be used if the provider only works for some registries. Cargo will try another provider, if available
NotFound
Credentials could not be found. Cargo will try another provider, if available
OperationNotSupported
The provider doesn’t support this operation, such as a provider that can’t support ‘login’ / ‘logout’
Other(Box<dyn StdError + Sync + Send>)
The provider failed to perform the operation. Other providers will not be attempted
Unknown
A new variant was added to this enum since Cargo was built
Trait Implementations§
source§impl<'de> Deserialize<'de> for Error
impl<'de> Deserialize<'de> for Error
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Error for Error
impl Error for Error
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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