Enum nostr_types::EventReference
source · pub enum EventReference {
Id {
id: Id,
author: Option<PublicKey>,
relays: Vec<RelayUrl>,
marker: Option<String>,
},
Addr(NAddr),
}
Expand description
A reference to another event, either by Id
(often coming from an ‘e’ tag),
or by NAddr
(often coming from an ‘a’ tag).
Variants§
Id
Refer to a specific event by Id
Fields
Optionally include author (to find via their relay list)
Addr(NAddr)
Refer to a replaceable event by NAddr
Implementations§
source§impl EventReference
impl EventReference
Get the author
Set the author
sourcepub fn copy_relays(&self) -> Vec<RelayUrl>
pub fn copy_relays(&self) -> Vec<RelayUrl>
Copy the relays
sourcepub fn extend_relays(&mut self, relays: Vec<RelayUrl>)
pub fn extend_relays(&mut self, relays: Vec<RelayUrl>)
Extend relays
Trait Implementations§
source§impl Clone for EventReference
impl Clone for EventReference
source§fn clone(&self) -> EventReference
fn clone(&self) -> EventReference
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 EventReference
impl Debug for EventReference
source§impl<'de> Deserialize<'de> for EventReference
impl<'de> Deserialize<'de> for EventReference
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
source§impl Hash for EventReference
impl Hash for EventReference
source§impl PartialEq for EventReference
impl PartialEq for EventReference
source§impl Serialize for EventReference
impl Serialize for EventReference
impl Eq for EventReference
Auto Trait Implementations§
impl Freeze for EventReference
impl RefUnwindSafe for EventReference
impl Send for EventReference
impl Sync for EventReference
impl Unpin for EventReference
impl UnwindSafe for EventReference
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