pub struct NostrEventKind(/* private fields */);Expand description
A NIP-01 event kind in the inclusive 0...65535 range.
Implementations§
Source§impl NostrEventKind
impl NostrEventKind
Sourcepub const USER_METADATA: Self
pub const USER_METADATA: Self
NIP-01 user metadata (kind 0).
Sourcepub const SHORT_TEXT_NOTE: Self
pub const SHORT_TEXT_NOTE: Self
NIP-01 short text note (kind 1).
Sourcepub const FOLLOW_LIST: Self
pub const FOLLOW_LIST: Self
NIP-02 follow list (kind 3).
Sourcepub const EVENT_DELETION_REQUEST: Self
pub const EVENT_DELETION_REQUEST: Self
NIP-09 event deletion request (kind 5).
Sourcepub const PRIVATE_DIRECT_MESSAGE: Self
pub const PRIVATE_DIRECT_MESSAGE: Self
NIP-17 private direct message rumor (kind 14).
Sourcepub const GENERIC_REPOST: Self
pub const GENERIC_REPOST: Self
NIP-18 generic repost (kind 16).
Sourcepub const UPDATED_CONTENT: Self
pub const UPDATED_CONTENT: Self
Softchat updated-content event (kind 1010).
Sourcepub const FILE_METADATA: Self
pub const FILE_METADATA: Self
NIP-94 file metadata (kind 1063).
Sourcepub const EPHEMERAL_GIFT_WRAP: Self
pub const EPHEMERAL_GIFT_WRAP: Self
NIP-59 ephemeral gift wrap (kind 21059).
Sourcepub const CLIENT_AUTHENTICATION: Self
pub const CLIENT_AUTHENTICATION: Self
NIP-42 client authentication (kind 22242).
Sourcepub const HTTP_AUTHENTICATION: Self
pub const HTTP_AUTHENTICATION: Self
NIP-98 HTTP authentication (kind 27235).
Sourcepub const APPLICATION_DATA: Self
pub const APPLICATION_DATA: Self
NIP-78 application-specific data (kind 30078).
Sourcepub const APPLICATION_DATA_SYNC: Self
pub const APPLICATION_DATA_SYNC: Self
Softchat application-data synchronization (kind 30079).
Sourcepub fn try_from_u32(value: u32) -> Result<Self, SoftchatError>
pub fn try_from_u32(value: u32) -> Result<Self, SoftchatError>
Validate a wider integer before narrowing it.
§Errors
Returns SoftchatError::InvalidEventKind when the value is larger
than the NIP-01 range.
Trait Implementations§
Source§impl Clone for NostrEventKind
impl Clone for NostrEventKind
Source§fn clone(&self) -> NostrEventKind
fn clone(&self) -> NostrEventKind
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 moreSource§impl Debug for NostrEventKind
impl Debug for NostrEventKind
Source§impl Hash for NostrEventKind
impl Hash for NostrEventKind
Source§impl Ord for NostrEventKind
impl Ord for NostrEventKind
Source§fn cmp(&self, other: &NostrEventKind) -> Ordering
fn cmp(&self, other: &NostrEventKind) -> 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
Source§impl PartialEq for NostrEventKind
impl PartialEq for NostrEventKind
Source§fn eq(&self, other: &NostrEventKind) -> bool
fn eq(&self, other: &NostrEventKind) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for NostrEventKind
impl PartialOrd for NostrEventKind
impl Copy for NostrEventKind
impl Eq for NostrEventKind
impl StructuralPartialEq for NostrEventKind
Auto Trait Implementations§
impl Freeze for NostrEventKind
impl RefUnwindSafe for NostrEventKind
impl Send for NostrEventKind
impl Sync for NostrEventKind
impl Unpin for NostrEventKind
impl UnsafeUnpin for NostrEventKind
impl UnwindSafe for NostrEventKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<> Read more