Enum nostr_types::RelayMessageV5
source · pub enum RelayMessageV5 {
Auth(String),
Closed(SubscriptionId, String),
Eose(SubscriptionId),
Event(SubscriptionId, Box<EventV3>),
Notice(String),
Notify(String),
Ok(Id, bool, String),
}
Expand description
A message from a relay to a client
Variants§
Auth(String)
Used to send authentication challenges
Closed(SubscriptionId, String)
Used to indicate that a subscription was ended on the server side Every ClientMessage::Req may trigger a RelayMessage::Closed response The last parameter may have a colon-terminated machine-readable prefix of: duplicate, pow, blocked, rate-limited, invalid, auth-required, restricted, or error
Eose(SubscriptionId)
End of subscribed events notification
Event(SubscriptionId, Box<EventV3>)
An event matching a subscription
Notice(String)
A human readable notice for errors and other information
Notify(String)
A human readable notice for the end user
Ok(Id, bool, String)
Used to notify clients if an event was successuful Every ClientMessage::Event will trigger a RelayMessage::OK response The last parameter may have a colon-terminated machine-readable prefix of: duplicate, pow, blocked, rate-limited, invalid, auth-required, restricted or error
Implementations§
Trait Implementations§
source§impl Clone for RelayMessageV5
impl Clone for RelayMessageV5
source§fn clone(&self) -> RelayMessageV5
fn clone(&self) -> RelayMessageV5
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RelayMessageV5
impl Debug for RelayMessageV5
source§impl<'de> Deserialize<'de> for RelayMessageV5
impl<'de> Deserialize<'de> for RelayMessageV5
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>,
source§impl PartialEq for RelayMessageV5
impl PartialEq for RelayMessageV5
source§fn eq(&self, other: &RelayMessageV5) -> bool
fn eq(&self, other: &RelayMessageV5) -> bool
self
and other
values to be equal, and is used
by ==
.