#[non_exhaustive]pub enum ApprovalError {
Show 13 variants
WrongKind(Kind),
MissingCommunity,
MissingTarget,
MissingPostAuthor,
MissingPostKind,
MalformedEventTag,
MalformedAddressTag,
MalformedAuthorTag,
MalformedKindTag,
InvalidCoordinate(CoordinateError),
InvalidEventId(EventIdError),
InvalidPublicKey(PublicKeyError),
InvalidRelayUrl(RelayUrlError),
}Expand description
Errors raised while parsing a PostApproval.
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 was not 4550.
MissingCommunity
No community a tag was present.
MissingTarget
No e/a target tag was present.
MissingPostAuthor
No p author tag was present.
MissingPostKind
No k kind tag was present.
MalformedEventTag
e tag value was missing.
MalformedAddressTag
a tag value was missing.
MalformedAuthorTag
p tag value was missing.
MalformedKindTag
k tag was malformed.
InvalidCoordinate(CoordinateError)
Coordinate string was not parseable.
InvalidEventId(EventIdError)
Event id hex was not parseable.
InvalidPublicKey(PublicKeyError)
Pubkey hex was not parseable.
InvalidRelayUrl(RelayUrlError)
Relay URL was not parseable.
Trait Implementations§
Source§impl Debug for ApprovalError
impl Debug for ApprovalError
Source§impl Display for ApprovalError
impl Display for ApprovalError
Source§impl Error for ApprovalError
impl Error for ApprovalError
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 ApprovalError
impl RefUnwindSafe for ApprovalError
impl Send for ApprovalError
impl Sync for ApprovalError
impl Unpin for ApprovalError
impl UnsafeUnpin for ApprovalError
impl UnwindSafe for ApprovalError
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