#[non_exhaustive]pub enum PublicMessageError {
WrongKind(Kind),
MalformedRecipient,
ForbiddenEventTag,
MissingRecipient,
InvalidPublicKey(PublicKeyError),
InvalidRelayUrl(RelayUrlError),
}Expand description
Errors raised while parsing a NIP-A4 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 24.
MalformedRecipient
p tag is missing the pubkey column.
ForbiddenEventTag
Spec forbids e tags on public messages.
MissingRecipient
Event has no p recipient.
InvalidPublicKey(PublicKeyError)
Wrapped pubkey parser error.
InvalidRelayUrl(RelayUrlError)
Wrapped relay-URL parser error.
Trait Implementations§
Source§impl Debug for PublicMessageError
impl Debug for PublicMessageError
Source§impl Display for PublicMessageError
impl Display for PublicMessageError
Source§impl Error for PublicMessageError
impl Error for PublicMessageError
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<PublicKeyError> for PublicMessageError
impl From<PublicKeyError> for PublicMessageError
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<RelayUrlError> for PublicMessageError
impl From<RelayUrlError> for PublicMessageError
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 PublicMessageError
impl RefUnwindSafe for PublicMessageError
impl Send for PublicMessageError
impl Sync for PublicMessageError
impl Unpin for PublicMessageError
impl UnsafeUnpin for PublicMessageError
impl UnwindSafe for PublicMessageError
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