#[non_exhaustive]pub enum FileMetadataError {
WrongKind(Kind),
MissingUrl,
MissingMimeType,
MissingHash,
InvalidUrl(UrlError),
InvalidHash(HexError),
InvalidHashLength(usize),
InvalidSize(String),
InvalidDim(ImageError),
}Expand description
Errors raised by FileMetadata::from_event / FileMetadata::to_tags.
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.
WrongKind(Kind)
The event was not kind: 1063.
MissingUrl
The required url tag is missing.
MissingMimeType
The required m (MIME) tag is missing.
MissingHash
The required x (SHA-256) tag is missing.
InvalidUrl(UrlError)
A URL value did not parse.
InvalidHash(HexError)
A SHA-256 value did not decode as 32 bytes of hex.
InvalidHashLength(usize)
SHA-256 hex was the wrong length.
InvalidSize(String)
The size value did not parse as u64.
InvalidDim(ImageError)
The dim value did not parse as <width>x<height>.
Trait Implementations§
Source§impl Debug for FileMetadataError
impl Debug for FileMetadataError
Source§impl Display for FileMetadataError
impl Display for FileMetadataError
Source§impl Error for FileMetadataError
impl Error for FileMetadataError
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 FileMetadataError
impl RefUnwindSafe for FileMetadataError
impl Send for FileMetadataError
impl Sync for FileMetadataError
impl Unpin for FileMetadataError
impl UnsafeUnpin for FileMetadataError
impl UnwindSafe for FileMetadataError
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