Struct tungstenite::protocol::frame::CloseFrame
source · pub struct CloseFrame<'t> {
pub code: CloseCode,
pub reason: Cow<'t, str>,
}
Expand description
A struct representing the close command.
Fields§
§code: CloseCode
The reason as a code.
reason: Cow<'t, str>
The reason as text string.
Implementations§
source§impl<'t> CloseFrame<'t>
impl<'t> CloseFrame<'t>
sourcepub fn into_owned(self) -> CloseFrame<'static>
pub fn into_owned(self) -> CloseFrame<'static>
Convert into a owned string.
Trait Implementations§
source§impl<'t> Clone for CloseFrame<'t>
impl<'t> Clone for CloseFrame<'t>
source§fn clone(&self) -> CloseFrame<'t>
fn clone(&self) -> CloseFrame<'t>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'t> Debug for CloseFrame<'t>
impl<'t> Debug for CloseFrame<'t>
source§impl<'t> Display for CloseFrame<'t>
impl<'t> Display for CloseFrame<'t>
source§impl<'t> PartialEq for CloseFrame<'t>
impl<'t> PartialEq for CloseFrame<'t>
source§fn eq(&self, other: &CloseFrame<'t>) -> bool
fn eq(&self, other: &CloseFrame<'t>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<'t> Eq for CloseFrame<'t>
impl<'t> StructuralPartialEq for CloseFrame<'t>
Auto Trait Implementations§
impl<'t> Freeze for CloseFrame<'t>
impl<'t> RefUnwindSafe for CloseFrame<'t>
impl<'t> Send for CloseFrame<'t>
impl<'t> Sync for CloseFrame<'t>
impl<'t> Unpin for CloseFrame<'t>
impl<'t> UnwindSafe for CloseFrame<'t>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)