#[non_exhaustive]pub enum Inbound {
Text(String),
Binary,
Close,
}Available on crate feature
server only.Expand description
A WebSocket message received from the client, as the driver needs it.
Fragmented messages must already be coalesced (RFC 8887 §4.3); every WebSocket library does this. Map Ping and Pong to nothing: the library answers Pings itself.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Text(String)
A text message (UTF-8, checked by the WebSocket library).
Binary
A binary message; its payload is not needed.
Close
A Close frame: the client is ending the connection.
Trait Implementations§
impl Eq for Inbound
impl StructuralPartialEq for Inbound
Auto Trait Implementations§
impl Forget for Inbound
impl Freeze for Inbound
impl Move for Inbound
impl RefUnwindSafe for Inbound
impl Send for Inbound
impl Sync for Inbound
impl Unpin for Inbound
impl UnsafeUnpin for Inbound
impl UnwindSafe for Inbound
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