Enum nostr_types::RelayMessageV3
source · pub enum RelayMessageV3 {
Auth(String),
Closed(SubscriptionId, String),
Eose(SubscriptionId),
Event(SubscriptionId, Box<EventV2>),
Notice(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<EventV2>)
An event matching a subscription
Notice(String)
A human readable notice for errors and other information
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 RelayMessageV3
impl Clone for RelayMessageV3
source§fn clone(&self) -> RelayMessageV3
fn clone(&self) -> RelayMessageV3
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RelayMessageV3
impl Debug for RelayMessageV3
source§impl<'de> Deserialize<'de> for RelayMessageV3
impl<'de> Deserialize<'de> for RelayMessageV3
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 RelayMessageV3
impl PartialEq for RelayMessageV3
source§fn eq(&self, other: &RelayMessageV3) -> bool
fn eq(&self, other: &RelayMessageV3) -> bool
self
and other
values to be equal, and is used
by ==
.