#[non_exhaustive]pub enum GroupError {
WrongKind(Kind),
MissingGroupRef,
MissingIdentifier,
MissingPubkey,
MissingEvent,
MissingCode,
InvalidGroupId(GroupIdError),
InvalidPublicKey(PublicKeyError),
InvalidUrl(UrlError),
InvalidEventId(EventIdError),
}Expand description
Errors raised while parsing NIP-29 events.
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 does not match the expected NIP-29 kind.
MissingGroupRef
h tag missing on a user-side event.
MissingIdentifier
d tag missing on a state event.
MissingPubkey
p tag missing on a moderation event that requires it.
MissingEvent
e tag missing on a 9005 delete-event.
MissingCode
code tag missing on 9009 create-invite.
InvalidGroupId(GroupIdError)
Group id parsing error.
InvalidPublicKey(PublicKeyError)
Wrapped pubkey parser error.
InvalidUrl(UrlError)
Wrapped URL parser error.
InvalidEventId(EventIdError)
Wrapped event-id parser error.
Trait Implementations§
Source§impl Debug for GroupError
impl Debug for GroupError
Source§impl Display for GroupError
impl Display for GroupError
Source§impl Error for GroupError
impl Error for GroupError
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<EventIdError> for GroupError
impl From<EventIdError> for GroupError
Source§fn from(source: EventIdError) -> Self
fn from(source: EventIdError) -> Self
Converts to this type from the input type.
Source§impl From<GroupIdError> for GroupError
impl From<GroupIdError> for GroupError
Source§fn from(source: GroupIdError) -> Self
fn from(source: GroupIdError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for GroupError
impl From<PublicKeyError> for GroupError
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for GroupError
impl RefUnwindSafe for GroupError
impl Send for GroupError
impl Sync for GroupError
impl Unpin for GroupError
impl UnsafeUnpin for GroupError
impl UnwindSafe for GroupError
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