#[non_exhaustive]pub struct ConnectionCloseFrame<'a> {
pub error_code: u64,
pub frame_type: Option<u64>,
pub reason: Option<&'a [u8]>,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.error_code: u64§frame_type: Option<u64>§reason: Option<&'a [u8]>Implementations§
Source§impl<'a> ConnectionCloseFrame<'a>
impl<'a> ConnectionCloseFrame<'a>
Sourcepub fn reason_lossy_utf8(&self) -> Option<Cow<'a, str>>
pub fn reason_lossy_utf8(&self) -> Option<Cow<'a, str>>
Converts the reason to a UTF-8 str, including invalid characters
Trait Implementations§
Source§impl<'a> Clone for ConnectionCloseFrame<'a>
impl<'a> Clone for ConnectionCloseFrame<'a>
Source§fn clone(&self) -> ConnectionCloseFrame<'a>
fn clone(&self) -> ConnectionCloseFrame<'a>
Returns a duplicate 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<'a> Debug for ConnectionCloseFrame<'a>
impl<'a> Debug for ConnectionCloseFrame<'a>
Source§impl<'a> IntoEvent<ConnectionCloseFrame<'a>> for ConnectionCloseFrame<'a>
impl<'a> IntoEvent<ConnectionCloseFrame<'a>> for ConnectionCloseFrame<'a>
fn into_event(self) -> ConnectionCloseFrame<'a>
Auto Trait Implementations§
impl<'a> Freeze for ConnectionCloseFrame<'a>
impl<'a> RefUnwindSafe for ConnectionCloseFrame<'a>
impl<'a> Send for ConnectionCloseFrame<'a>
impl<'a> Sync for ConnectionCloseFrame<'a>
impl<'a> Unpin for ConnectionCloseFrame<'a>
impl<'a> UnwindSafe for ConnectionCloseFrame<'a>
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