pub enum ConnectionCloseFrame {
App(AppCloseFrame),
Quic(QuicCloseFrame),
}
Expand description
CONNECTION_CLOSE Frame.
CONNECTION_CLOSE Frame {
Type (i) = 0x1c..0x1d,
Error Code (i),
[Frame Type (i)],
Reason Phrase Length (i),
Reason Phrase (..),
}
See connection close frames of QUIC for more details.
Variants§
App(AppCloseFrame)
Quic(QuicCloseFrame)
Implementations§
Source§impl ConnectionCloseFrame
impl ConnectionCloseFrame
Sourcepub fn new_quic(
error_kind: ErrorKind,
frame_type: ErrorFrameType,
reason: impl Into<Cow<'static, str>>,
) -> ConnectionCloseFrame
pub fn new_quic( error_kind: ErrorKind, frame_type: ErrorFrameType, reason: impl Into<Cow<'static, str>>, ) -> ConnectionCloseFrame
Create a new ConnectionCloseFrame
at QUIC layer.
Trait Implementations§
Source§impl Clone for ConnectionCloseFrame
impl Clone for ConnectionCloseFrame
Source§fn clone(&self) -> ConnectionCloseFrame
fn clone(&self) -> ConnectionCloseFrame
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 Debug for ConnectionCloseFrame
impl Debug for ConnectionCloseFrame
Source§impl EncodeFrame for ConnectionCloseFrame
impl EncodeFrame for ConnectionCloseFrame
Source§fn max_encoding_size(&self) -> usize
fn max_encoding_size(&self) -> usize
Return the max number of bytes needed to encode this value Read more
Source§fn encoding_size(&self) -> usize
fn encoding_size(&self) -> usize
Return the exact number of bytes needed to encode this value
Source§impl From<AppError> for ConnectionCloseFrame
impl From<AppError> for ConnectionCloseFrame
Source§fn from(e: AppError) -> ConnectionCloseFrame
fn from(e: AppError) -> ConnectionCloseFrame
Converts to this type from the input type.
Source§impl From<Error> for ConnectionCloseFrame
impl From<Error> for ConnectionCloseFrame
Source§fn from(e: Error) -> ConnectionCloseFrame
fn from(e: Error) -> ConnectionCloseFrame
Converts to this type from the input type.
Source§impl GetFrameType for ConnectionCloseFrame
impl GetFrameType for ConnectionCloseFrame
Source§fn frame_type(&self) -> FrameType
fn frame_type(&self) -> FrameType
Return the type of frame
Source§impl PartialEq for ConnectionCloseFrame
impl PartialEq for ConnectionCloseFrame
Source§impl<T> WriteFrame<ConnectionCloseFrame> for Twhere
T: BufMut,
impl<T> WriteFrame<ConnectionCloseFrame> for Twhere
T: BufMut,
Source§fn put_frame(&mut self, frame: &ConnectionCloseFrame)
fn put_frame(&mut self, frame: &ConnectionCloseFrame)
Write a frame to the buffer.
impl Eq for ConnectionCloseFrame
impl StructuralPartialEq for ConnectionCloseFrame
Auto Trait Implementations§
impl Freeze for ConnectionCloseFrame
impl RefUnwindSafe for ConnectionCloseFrame
impl Send for ConnectionCloseFrame
impl Sync for ConnectionCloseFrame
impl Unpin for ConnectionCloseFrame
impl UnwindSafe for ConnectionCloseFrame
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