#[non_exhaustive]pub enum MachineReadablePrefix {
Duplicate,
Pow,
Blocked,
RateLimited,
Invalid,
Error,
Restricted,
Mute,
AuthRequired,
PaymentRequired,
}Expand description
Standardised reason prefix used in OK / CLOSED reasons (NIP-20).
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.
Duplicate
duplicate: — the relay already had the event.
Pow
pow: — proof-of-work requirements were not met.
Blocked
blocked: — the author or pubkey is blocked by the relay.
RateLimited
rate-limited: — the client hit a rate limit.
Invalid
invalid: — the event failed validation.
Error
error: — the relay encountered an internal error.
Restricted
restricted: — the author lacks permission (e.g. NIP-42 not done).
Mute
mute: — an ephemeral event nobody was listening to (NIP-01 §OK
examples).
AuthRequired
auth-required: — NIP-42 authentication is required.
PaymentRequired
payment-required: — paid relay; the client has not paid yet.
Implementations§
Trait Implementations§
Source§impl Clone for MachineReadablePrefix
impl Clone for MachineReadablePrefix
Source§fn clone(&self) -> MachineReadablePrefix
fn clone(&self) -> MachineReadablePrefix
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MachineReadablePrefix
Source§impl Debug for MachineReadablePrefix
impl Debug for MachineReadablePrefix
Source§impl Display for MachineReadablePrefix
impl Display for MachineReadablePrefix
impl Eq for MachineReadablePrefix
Source§impl FromStr for MachineReadablePrefix
impl FromStr for MachineReadablePrefix
Source§impl Hash for MachineReadablePrefix
impl Hash for MachineReadablePrefix
Source§impl Ord for MachineReadablePrefix
impl Ord for MachineReadablePrefix
Source§fn cmp(&self, other: &MachineReadablePrefix) -> Ordering
fn cmp(&self, other: &MachineReadablePrefix) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for MachineReadablePrefix
impl PartialEq for MachineReadablePrefix
Source§impl PartialOrd for MachineReadablePrefix
impl PartialOrd for MachineReadablePrefix
impl StructuralPartialEq for MachineReadablePrefix
Auto Trait Implementations§
impl Freeze for MachineReadablePrefix
impl RefUnwindSafe for MachineReadablePrefix
impl Send for MachineReadablePrefix
impl Sync for MachineReadablePrefix
impl Unpin for MachineReadablePrefix
impl UnsafeUnpin for MachineReadablePrefix
impl UnwindSafe for MachineReadablePrefix
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.