pub struct NostrEvent {
pub id: String,
pub pubkey: String,
pub created_at: i64,
pub kind: u32,
pub tags: Vec<Vec<String>>,
pub content: String,
pub sig: String,
}Expand description
A NIP-01 event in its wire (relay) JSON shape. All binary fields are lowercase hex, per NIP-01.
Fields§
§id: String32-byte event id (hex) = sha256 of the NIP-01 serialization.
pubkey: String32-byte x-only secp256k1 public key (hex) — the sender’s npub material.
created_at: i64Unix seconds.
kind: u32NIP-01 tags ([["p","<hex>"], ["wire","did:wire:…"], …]).
content: StringEvent content. For a wire message this is the FULL signed wire event JSON.
sig: String64-byte BIP-340 schnorr signature (hex) over id.
Trait Implementations§
Source§impl Clone for NostrEvent
impl Clone for NostrEvent
Source§fn clone(&self) -> NostrEvent
fn clone(&self) -> NostrEvent
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 NostrEvent
impl Debug for NostrEvent
Source§impl<'de> Deserialize<'de> for NostrEvent
impl<'de> Deserialize<'de> for NostrEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for NostrEvent
Source§impl PartialEq for NostrEvent
impl PartialEq for NostrEvent
Source§impl Serialize for NostrEvent
impl Serialize for NostrEvent
impl StructuralPartialEq for NostrEvent
Auto Trait Implementations§
impl Freeze for NostrEvent
impl RefUnwindSafe for NostrEvent
impl Send for NostrEvent
impl Sync for NostrEvent
impl Unpin for NostrEvent
impl UnsafeUnpin for NostrEvent
impl UnwindSafe for NostrEvent
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.