#[non_exhaustive]pub enum Inbound {
Text(String),
Binary,
Close,
TooBig,
}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.
TooBig
The WebSocket library refused a message over its size cap while
reading it (tokio-tungstenite: Error::Capacity). The driver
closes the connection with CLOSE_MESSAGE_TOO_BIG.
Cap the library at maxSizeRequest
(ConnectionConfig::max_size_request), so that an oversized
message is refused before it is buffered whole.
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