#[non_exhaustive]pub enum PictureError {
WrongKind(Kind),
MalformedTaggedUser,
InvalidPublicKey(PublicKeyError),
InvalidRelayUrl(RelayUrlError),
InvalidMediaAttachment(MediaAttachmentError),
}Expand description
Errors raised while parsing a NIP-68 event.
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)
Event kind is not 20.
MalformedTaggedUser
p tag is missing the pubkey column.
InvalidPublicKey(PublicKeyError)
Wrapped pubkey parser error.
InvalidRelayUrl(RelayUrlError)
Wrapped relay-URL parser error.
InvalidMediaAttachment(MediaAttachmentError)
Wrapped imeta parser error.
Trait Implementations§
Source§impl Debug for PictureError
impl Debug for PictureError
Source§impl Display for PictureError
impl Display for PictureError
Source§impl Error for PictureError
impl Error for PictureError
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<MediaAttachmentError> for PictureError
impl From<MediaAttachmentError> for PictureError
Source§fn from(source: MediaAttachmentError) -> Self
fn from(source: MediaAttachmentError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for PictureError
impl From<PublicKeyError> for PictureError
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<RelayUrlError> for PictureError
impl From<RelayUrlError> for PictureError
Source§fn from(source: RelayUrlError) -> Self
fn from(source: RelayUrlError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PictureError
impl RefUnwindSafe for PictureError
impl Send for PictureError
impl Sync for PictureError
impl Unpin for PictureError
impl UnsafeUnpin for PictureError
impl UnwindSafe for PictureError
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