pub enum ProtocolEvent {
Joined {
topic: String,
reference: String,
response: Payload,
},
JoinError {
topic: String,
reference: String,
response: Payload,
},
Left {
topic: String,
reference: String,
response: Payload,
},
Reply {
topic: String,
event: String,
reference: String,
status: ReplyStatus,
response: Payload,
},
Message(Frame),
ChannelClosed {
topic: String,
payload: Payload,
},
ChannelError {
topic: String,
payload: Payload,
},
HeartbeatAck {
reference: String,
status: ReplyStatus,
},
RequestInterrupted {
topic: String,
event: String,
reference: String,
},
StaleMessage(Frame),
UnmatchedReply(Frame),
}Expand description
Semantic event produced from an incoming Phoenix frame or connection reset.
Variants§
Joined
A topic join succeeded.
Fields
JoinError
A topic join was rejected.
Fields
Left
A topic leave completed.
Fields
Reply
An application push received a reply.
Fields
§
status: ReplyStatusPhoenix reply status.
Message(Frame)
An application or Presence message that was not a correlated reply.
ChannelClosed
The server sent phx_close for a topic.
ChannelError
The server sent phx_error for a topic.
HeartbeatAck
The server acknowledged a heartbeat.
RequestInterrupted
A pending request was interrupted by transport reset.
Fields
StaleMessage(Frame)
A frame belonged to an earlier join generation.
UnmatchedReply(Frame)
A reply had no matching pending operation.
Trait Implementations§
Source§impl Clone for ProtocolEvent
impl Clone for ProtocolEvent
Source§fn clone(&self) -> ProtocolEvent
fn clone(&self) -> ProtocolEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProtocolEvent
impl Debug for ProtocolEvent
Source§impl PartialEq for ProtocolEvent
impl PartialEq for ProtocolEvent
Source§fn eq(&self, other: &ProtocolEvent) -> bool
fn eq(&self, other: &ProtocolEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ProtocolEvent
Auto Trait Implementations§
impl Freeze for ProtocolEvent
impl RefUnwindSafe for ProtocolEvent
impl Send for ProtocolEvent
impl Sync for ProtocolEvent
impl Unpin for ProtocolEvent
impl UnsafeUnpin for ProtocolEvent
impl UnwindSafe for ProtocolEvent
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