pub enum RelayMessage {
Auth(String),
Closed(SubscriptionId, String),
Eose(SubscriptionId),
Event(SubscriptionId, Box<Event>),
Notice(String),
Notify(String),
Ok(Id, bool, String),
Count(SubscriptionId, CountResult),
}
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<Event>)
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
Count(SubscriptionId, CountResult)
The results of a COUNT command
Implementations§
Trait Implementations§
Source§impl Clone for RelayMessage
impl Clone for RelayMessage
Source§fn clone(&self) -> RelayMessage
fn clone(&self) -> RelayMessage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more