pub enum LabelTarget {
Event {
id: EventId,
relay_hint: Option<RelayUrl>,
},
Pubkey {
pubkey: PublicKey,
relay_hint: Option<RelayUrl>,
},
Address {
coordinate: Coordinate,
relay_hint: Option<RelayUrl>,
},
Url(Url),
Topic(String),
}Expand description
The object a label points at. The spec lists five wire columns; we map them to typed variants and preserve relay hints when the spec allows them.
Variants§
Event
e tag — labels a specific event by id.
Fields
Pubkey
p tag — labels a profile by pubkey.
Address
a tag — labels an addressable event by coordinate.
Url(Url)
r tag — labels an external URL.
Topic(String)
t tag — labels a hashtag/topic. Lower-cased by Tag::t.
Implementations§
Trait Implementations§
Source§impl Clone for LabelTarget
impl Clone for LabelTarget
Source§fn clone(&self) -> LabelTarget
fn clone(&self) -> LabelTarget
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 LabelTarget
impl Debug for LabelTarget
impl Eq for LabelTarget
Source§impl PartialEq for LabelTarget
impl PartialEq for LabelTarget
impl StructuralPartialEq for LabelTarget
Auto Trait Implementations§
impl Freeze for LabelTarget
impl RefUnwindSafe for LabelTarget
impl Send for LabelTarget
impl Sync for LabelTarget
impl Unpin for LabelTarget
impl UnsafeUnpin for LabelTarget
impl UnwindSafe for LabelTarget
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> 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.