#[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
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>,
source§impl Error for Error
impl Error for Error
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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: 24 bytes
Size for each variant:
UrlNotSupported
: 0 bytesNotFound
: 0 bytesOperationNotSupported
: 0 bytesOther
: 16 bytesUnknown
: 0 bytes