#[non_exhaustive]pub enum NamespaceVerifyError {
UnsupportedEcosystem {
ecosystem: String,
},
PackageNotFound {
ecosystem: Ecosystem,
package_name: String,
},
OwnershipNotConfirmed {
ecosystem: Ecosystem,
package_name: String,
},
ChallengeExpired,
InvalidToken {
reason: String,
},
InvalidPackageName {
name: String,
reason: String,
},
NetworkError {
message: String,
},
RateLimited {
ecosystem: Ecosystem,
},
}Expand description
Errors from namespace verification operations.
Usage:
ⓘ
match result {
Err(NamespaceVerifyError::UnsupportedEcosystem { .. }) => { /* unknown ecosystem */ }
Err(NamespaceVerifyError::OwnershipNotConfirmed { .. }) => { /* user is not owner */ }
Err(e) => return Err(e.into()),
Ok(proof) => { /* proceed with proof */ }
}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.
UnsupportedEcosystem
The requested ecosystem is not supported.
PackageNotFound
The package was not found in the upstream registry.
Fields
OwnershipNotConfirmed
Ownership could not be confirmed via the upstream registry.
ChallengeExpired
The verification challenge has expired.
InvalidToken
The verification token is invalid.
InvalidPackageName
The package name is invalid.
NetworkError
A network error occurred during verification.
RateLimited
The upstream registry returned a rate limit response.
Trait Implementations§
Source§impl AuthsErrorInfo for NamespaceVerifyError
impl AuthsErrorInfo for NamespaceVerifyError
Source§fn error_code(&self) -> &'static str
fn error_code(&self) -> &'static str
Returns a unique error code string for this error variant.
Source§fn suggestion(&self) -> Option<&'static str>
fn suggestion(&self) -> Option<&'static str>
Returns an optional actionable suggestion for resolving the error.
Source§impl Debug for NamespaceVerifyError
impl Debug for NamespaceVerifyError
Source§impl Display for NamespaceVerifyError
impl Display for NamespaceVerifyError
Source§impl Error for NamespaceVerifyError
impl Error for NamespaceVerifyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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 NamespaceVerifyError
impl RefUnwindSafe for NamespaceVerifyError
impl Send for NamespaceVerifyError
impl Sync for NamespaceVerifyError
impl Unpin for NamespaceVerifyError
impl UnsafeUnpin for NamespaceVerifyError
impl UnwindSafe for NamespaceVerifyError
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