pub enum Frame {
Text(String),
Binary(Bytes),
Ping(Bytes),
Pong(Bytes),
Close(Option<CloseFrame>),
}Available on crate feature
websocket only.Expand description
One websocket data or control frame, in either direction.
Variants§
Text(String)
A UTF-8 text frame.
Binary(Bytes)
A binary frame.
Ping(Bytes)
A ping, with its application payload.
Pong(Bytes)
A pong, with its application payload.
Close(Option<CloseFrame>)
A close frame, with the peer’s status and reason when it sent one.
Trait Implementations§
impl Eq for Frame
impl StructuralPartialEq for Frame
Auto Trait Implementations§
impl !Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnsafeUnpin for Frame
impl UnwindSafe for Frame
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