pub struct CloseFrame {
pub code: u16,
pub reason: String,
}Expand description
The close code and reason of a Message::Close.
u16 rather than an enum of the RFC 6455 §7.4 codes: this seam does
not interpret them, and an enum would have to decide what a reserved
or application-defined code means, and this seam has not decided.
Fields§
§code: u16RFC 6455 §7.4 status code.
reason: StringThe reason, which RFC 6455 requires to be valid UTF-8.
Trait Implementations§
Source§impl Clone for CloseFrame
impl Clone for CloseFrame
Source§fn clone(&self) -> CloseFrame
fn clone(&self) -> CloseFrame
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CloseFrame
impl Debug for CloseFrame
impl Eq for CloseFrame
Source§impl PartialEq for CloseFrame
impl PartialEq for CloseFrame
impl StructuralPartialEq for CloseFrame
Auto Trait Implementations§
impl Freeze for CloseFrame
impl RefUnwindSafe for CloseFrame
impl Send for CloseFrame
impl Sync for CloseFrame
impl Unpin for CloseFrame
impl UnsafeUnpin for CloseFrame
impl UnwindSafe for CloseFrame
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