#[non_exhaustive]pub enum WebSocketEvent {
Connect(Connect),
Accept(Accept),
TextFrame(TextFrame),
BinaryFrame(BinaryFrame),
Disconnect(Disconnect),
Close(Close),
}
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.
Connect(Connect)
ASGI equivalent: websocket.connect
Accept(Accept)
ASGI equivalent: websocket.accept
TextFrame(TextFrame)
ASGI equivalent: websocket.receive
and websocket.send
with text
field set
BinaryFrame(BinaryFrame)
ASGI equivalent: websocket.receive
and websocket.send
with bytes
field set
Disconnect(Disconnect)
ASGI equivalent: websocket.disconnect
Close(Close)
ASGI equivalent: websocket.close
Trait Implementations§
Source§impl Clone for WebSocketEvent
impl Clone for WebSocketEvent
Source§fn clone(&self) -> WebSocketEvent
fn clone(&self) -> WebSocketEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl !Freeze for WebSocketEvent
impl RefUnwindSafe for WebSocketEvent
impl Send for WebSocketEvent
impl Sync for WebSocketEvent
impl Unpin for WebSocketEvent
impl UnwindSafe for WebSocketEvent
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