pub enum Tag {
Show 53 variants
Generic(TagKind, Vec<String, Global>),
Event(EventId, Option<UncheckedUrl>, Option<Marker>),
PubKey(XOnlyPublicKey, Option<UncheckedUrl>),
EventReport(EventId, Report),
PubKeyReport(XOnlyPublicKey, Report),
PubKeyLiveEvent {
pk: XOnlyPublicKey,
relay_url: Option<UncheckedUrl>,
marker: LiveEventMarker,
proof: Option<Signature>,
},
Reference(String),
RelayMetadata(UncheckedUrl, Option<RelayMetadata>),
Hashtag(String),
Geohash(String),
Identifier(String),
ExternalIdentity(Identity),
A {
kind: Kind,
public_key: XOnlyPublicKey,
identifier: String,
relay_url: Option<UncheckedUrl>,
},
Relay(UncheckedUrl),
ContactList {
pk: XOnlyPublicKey,
relay_url: Option<UncheckedUrl>,
alias: Option<String>,
},
POW {
nonce: u128,
difficulty: u8,
},
Delegation {
delegator_pk: XOnlyPublicKey,
conditions: Conditions,
sig: Signature,
},
ContentWarning {
reason: Option<String>,
},
Expiration(Timestamp),
Subject(String),
Challenge(String),
Title(String),
Image(UncheckedUrl, Option<ImageDimensions>),
Thumb(UncheckedUrl, Option<ImageDimensions>),
Summary(String),
Description(String),
Bolt11(String),
Preimage(String),
Relays(Vec<UncheckedUrl, Global>),
Amount(u64),
Lnurl(String),
Name(String),
PublishedAt(Timestamp),
Url(Url),
MimeType(String),
Aes256Gcm {
key: String,
iv: String,
},
Sha256(Hash),
Size(usize),
Dim(ImageDimensions),
Magnet(String),
Blurhash(String),
Streaming(UncheckedUrl),
Recording(UncheckedUrl),
Starts(Timestamp),
Ends(Timestamp),
Status(LiveEventStatus),
CurrentParticipants(u64),
TotalParticipants(u64),
AbsoluteURL(UncheckedUrl),
Method(HttpMethod),
Payload(Hash),
Anon {
msg: Option<String>,
},
Proxy {
id: String,
protocol: Protocol,
},
}
Variants§
Generic(TagKind, Vec<String, Global>)
Event(EventId, Option<UncheckedUrl>, Option<Marker>)
PubKey(XOnlyPublicKey, Option<UncheckedUrl>)
EventReport(EventId, Report)
PubKeyReport(XOnlyPublicKey, Report)
PubKeyLiveEvent
Reference(String)
RelayMetadata(UncheckedUrl, Option<RelayMetadata>)
Hashtag(String)
Geohash(String)
Identifier(String)
ExternalIdentity(Identity)
A
Relay(UncheckedUrl)
ContactList
POW
Delegation
ContentWarning
Expiration(Timestamp)
Subject(String)
Challenge(String)
Title(String)
Image(UncheckedUrl, Option<ImageDimensions>)
Thumb(UncheckedUrl, Option<ImageDimensions>)
Summary(String)
Description(String)
Bolt11(String)
Preimage(String)
Relays(Vec<UncheckedUrl, Global>)
Amount(u64)
Lnurl(String)
Name(String)
PublishedAt(Timestamp)
Url(Url)
MimeType(String)
Aes256Gcm
Sha256(Hash)
Size(usize)
Dim(ImageDimensions)
Magnet(String)
Blurhash(String)
Streaming(UncheckedUrl)
Recording(UncheckedUrl)
Starts(Timestamp)
Ends(Timestamp)
Status(LiveEventStatus)
CurrentParticipants(u64)
TotalParticipants(u64)
AbsoluteURL(UncheckedUrl)
Method(HttpMethod)
Payload(Hash)
Anon
Proxy
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Tag
impl<'de> Deserialize<'de> for Tag
source§fn deserialize<D>(
deserializer: D
) -> Result<Tag, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>( deserializer: D ) -> Result<Tag, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<ParameterizedReplaceableEvent> for Tag
impl From<ParameterizedReplaceableEvent> for Tag
source§fn from(value: ParameterizedReplaceableEvent) -> Tag
fn from(value: ParameterizedReplaceableEvent) -> Tag
Converts to this type from the input type.
source§impl Ord for Tag
impl Ord for Tag
source§impl PartialOrd<Tag> for Tag
impl PartialOrd<Tag> for Tag
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 Tag
impl Serialize for Tag
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 Tag
impl StructuralEq for Tag
impl StructuralPartialEq for Tag
Auto Trait Implementations§
impl RefUnwindSafe for Tag
impl Send for Tag
impl Sync for Tag
impl Unpin for Tag
impl UnwindSafe for Tag
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<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.