pub struct CloseTriggerFrames { /* private fields */ }
Expand description
A container for frames that h3i expects to see over a given connection. If h3i receives all the frames it expects, it will send a CONNECTION_CLOSE frame to the server. This bypasses the idle timeout and vastly quickens test suites which depend heavily on h3i.
The specific CONNECTION_CLOSE frame can be customized by passing a
ConnectionError
to Self::new_with_connection_close
. h3i will send an
application CONNECTION_CLOSE frame with error code 0x100 if this struct is
constructed with the Self::new
constructor.
Implementations§
Source§impl CloseTriggerFrames
impl CloseTriggerFrames
Sourcepub fn new(frames: Vec<CloseTriggerFrame>) -> Self
pub fn new(frames: Vec<CloseTriggerFrame>) -> Self
Create a new CloseTriggerFrames
. If all expected frames are
received, h3i will close the connection with an application-level
CONNECTION_CLOSE frame with error code 0x100.
Sourcepub fn new_with_connection_close(
frames: Vec<CloseTriggerFrame>,
close_with: ConnectionError,
) -> Self
pub fn new_with_connection_close( frames: Vec<CloseTriggerFrame>, close_with: ConnectionError, ) -> Self
Create a new CloseTriggerFrames
with a custom close frame. When all
close trigger frames are received, h3i will close the connection with
the level, error code, and reason from close_with
.
Trait Implementations§
Source§impl Clone for CloseTriggerFrames
impl Clone for CloseTriggerFrames
Source§fn clone(&self) -> CloseTriggerFrames
fn clone(&self) -> CloseTriggerFrames
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CloseTriggerFrames
impl Debug for CloseTriggerFrames
Source§impl From<Vec<CloseTriggerFrame>> for CloseTriggerFrames
impl From<Vec<CloseTriggerFrame>> for CloseTriggerFrames
Source§fn from(value: Vec<CloseTriggerFrame>) -> Self
fn from(value: Vec<CloseTriggerFrame>) -> Self
Auto Trait Implementations§
impl Freeze for CloseTriggerFrames
impl !RefUnwindSafe for CloseTriggerFrames
impl Send for CloseTriggerFrames
impl Sync for CloseTriggerFrames
impl Unpin for CloseTriggerFrames
impl !UnwindSafe for CloseTriggerFrames
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more