Struct nostr_sdk::UnsignedEvent
source · pub struct UnsignedEvent {
pub id: EventId,
pub pubkey: XOnlyPublicKey,
pub created_at: Timestamp,
pub kind: Kind,
pub tags: Vec<Tag, Global>,
pub content: String,
}Expand description
UnsignedEvent struct
Fields§
§id: EventIdId
pubkey: XOnlyPublicKeyAuthor
created_at: TimestampTimestamp (seconds)
kind: KindKind
Vector of Tag
content: StringContent
Implementations§
source§impl UnsignedEvent
impl UnsignedEvent
sourcepub fn add_signature(self, sig: Signature) -> Result<Event, Error>
pub fn add_signature(self, sig: Signature) -> Result<Event, Error>
Add signature to UnsignedEvent
Trait Implementations§
source§impl Clone for UnsignedEvent
impl Clone for UnsignedEvent
source§fn clone(&self) -> UnsignedEvent
fn clone(&self) -> UnsignedEvent
Returns a copy of the value. Read more
1.0.0 · 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 UnsignedEvent
impl Debug for UnsignedEvent
source§impl<'de> Deserialize<'de> for UnsignedEvent
impl<'de> Deserialize<'de> for UnsignedEvent
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<UnsignedEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<UnsignedEvent, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Ord for UnsignedEvent
impl Ord for UnsignedEvent
source§fn cmp(&self, other: &UnsignedEvent) -> Ordering
fn cmp(&self, other: &UnsignedEvent) -> Ordering
1.21.0 · 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<UnsignedEvent> for UnsignedEvent
impl PartialEq<UnsignedEvent> for UnsignedEvent
source§fn eq(&self, other: &UnsignedEvent) -> bool
fn eq(&self, other: &UnsignedEvent) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<UnsignedEvent> for UnsignedEvent
impl PartialOrd<UnsignedEvent> for UnsignedEvent
source§fn partial_cmp(&self, other: &UnsignedEvent) -> Option<Ordering>
fn partial_cmp(&self, other: &UnsignedEvent) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl Serialize for UnsignedEvent
impl Serialize for UnsignedEvent
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for UnsignedEvent
impl StructuralEq for UnsignedEvent
impl StructuralPartialEq for UnsignedEvent
Auto Trait Implementations§
impl RefUnwindSafe for UnsignedEvent
impl Send for UnsignedEvent
impl Sync for UnsignedEvent
impl Unpin for UnsignedEvent
impl UnwindSafe for UnsignedEvent
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.