#[non_exhaustive]pub enum Error {
Show 16 variants
RecordTooLarge,
MissingSignature,
EmptyData,
NameMismatch,
MissingPublicKey,
InvalidSignature,
Expired,
DataMismatch,
InvalidValidityType,
Protobuf(Error),
Cbor(Box<dyn Error + Send + Sync + 'static>),
InvalidValidity(ParseError),
SigningError(SigningError),
InvalidPublicKey(DecodingError),
Multihash(Error),
ReservedMetadataKey(String),
}Expand description
Errors produced when creating, decoding, or validating an IPNS Record.
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.
RecordTooLarge
The record exceeds the 10 KiB IPNS size limit.
MissingSignature
The record is missing its V2 signature.
EmptyData
The record is missing its data field.
NameMismatch
The signing key does not correspond to the IPNS name.
MissingPublicKey
The IPNS name does not inline a public key and the record omits one.
InvalidSignature
The V2 signature failed verification.
Expired
The record’s EOL validity has elapsed.
DataMismatch
The dag-cbor data does not match the record’s protobuf fields.
InvalidValidityType
Unrecognized validity type.
Protobuf(Error)
Malformed protobuf.
Cbor(Box<dyn Error + Send + Sync + 'static>)
Malformed dag-cbor data.
InvalidValidity(ParseError)
Malformed EOL validity timestamp.
SigningError(SigningError)
A key or signing operation failed.
InvalidPublicKey(DecodingError)
Invalid public key.
Multihash(Error)
Malformed multihash or peer id.
ReservedMetadataKey(String)
A metadata key collides with a reserved IPNS field name.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(e: ParseError) -> Self
fn from(e: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin 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