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 moresource§impl Debug for RelayMessage
impl Debug for RelayMessage
source§impl<'de> Deserialize<'de> for RelayMessage
impl<'de> Deserialize<'de> for RelayMessage
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 RelayMessage
impl PartialEq for RelayMessage
source§impl Serialize for RelayMessage
impl Serialize for RelayMessage
impl Eq for RelayMessage
impl StructuralPartialEq for RelayMessage
Auto Trait Implementations§
impl Freeze for RelayMessage
impl RefUnwindSafe for RelayMessage
impl Send for RelayMessage
impl Sync for RelayMessage
impl Unpin for RelayMessage
impl UnwindSafe for RelayMessage
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)