#[non_exhaustive]pub enum ProduceError {
NoKeys,
TooManyKeys {
max: usize,
actual: usize,
},
UnsupportedKey {
index: usize,
reason: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
InvalidParams {
reason: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
Document(DocumentError),
Backend(Box<dyn Error + Send + Sync>),
}Expand description
Why a DidProducer could not produce a document.
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.
NoKeys
The method needs at least one key and got none.
TooManyKeys
More keys than the method can hold in one document.
UnsupportedKey
A key the method cannot represent: a private key, an unsupported key type, a malformed JWK. The source is the error that says why, when there is one.
Fields
InvalidParams
The method-specific parameters are invalid. The source is the error that says why, when there is one.
Fields
Document(DocumentError)
The document could not be assembled.
Backend(Box<dyn Error + Send + Sync>)
A failure of whatever the method writes to (a registry, a file).
Implementations§
Source§impl ProduceError
impl ProduceError
Sourcepub fn unsupported_key(index: usize, reason: impl Into<String>) -> Self
pub fn unsupported_key(index: usize, reason: impl Into<String>) -> Self
ProduceError::UnsupportedKey for the key at index, without an underlying error.
Sourcepub fn invalid_params(reason: impl Into<String>) -> Self
pub fn invalid_params(reason: impl Into<String>) -> Self
ProduceError::InvalidParams without an underlying error.
Trait Implementations§
Source§impl Debug for ProduceError
impl Debug for ProduceError
Source§impl Display for ProduceError
impl Display for ProduceError
Source§impl Error for ProduceError
impl Error for ProduceError
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()
Source§impl From<DocumentError> for ProduceError
impl From<DocumentError> for ProduceError
Source§fn from(source: DocumentError) -> Self
fn from(source: DocumentError) -> Self
Converts to this type from the input type.
Source§impl From<ProduceError> for IdentityError
impl From<ProduceError> for IdentityError
Source§fn from(source: ProduceError) -> Self
fn from(source: ProduceError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ProduceError
impl !UnwindSafe for ProduceError
impl Freeze for ProduceError
impl Send for ProduceError
impl Sync for ProduceError
impl Unpin for ProduceError
impl UnsafeUnpin for ProduceError
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