pub struct Incoming {
pub kind: Kind,
pub identifier: String,
pub message: Option<Message>,
pub reason: Option<DisconnectReason>,
pub reconnect: bool,
}Expand description
A decoded server-to-client frame. reason and reconnect are only set on
Kind::Disconnect, message on Kind::Message and Kind::Ping, and the
identifier is empty on the frames that concern the connection rather than a
subscription. A Kind::Message frame with no message is dropped and logged rather
than delivered empty, which is where this client parts from the Go one.
Fields§
§kind: KindWhat the server sent.
identifier: StringThe subscription it is about, empty on the frames about the connection itself.
message: Option<Message>The payload, on Kind::Message and Kind::Ping.
reason: Option<DisconnectReason>Why the server is hanging up, on Kind::Disconnect.
reconnect: boolWhether the server expects the client back, on Kind::Disconnect.
Implementations§
Trait Implementations§
impl Eq for Incoming
impl StructuralPartialEq for Incoming
Auto Trait Implementations§
impl Freeze for Incoming
impl RefUnwindSafe for Incoming
impl Send for Incoming
impl Sync for Incoming
impl Unpin for Incoming
impl UnsafeUnpin for Incoming
impl UnwindSafe for Incoming
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