pub struct CloseTriggerFrame { /* private fields */ }Expand description
Instructs h3i to watch for certain incoming H3iFrames. The incoming
frames can either be supplied directly via CloseTriggerFrame::new, or
via a verification callback passed to
CloseTriggerFrame::new_with_comparator.
Implementations§
Source§impl CloseTriggerFrame
impl CloseTriggerFrame
Sourcepub fn new(stream_id: u64, frame: impl Into<H3iFrame>) -> Self
pub fn new(stream_id: u64, frame: impl Into<H3iFrame>) -> Self
Create a new CloseTriggerFrame which should watch for the provided
H3iFrame.
§Note
For QuicheH3 and ResetStream variants, equivalence is the same as equality.
For Headers variants, this CloseTriggerFrame is equivalent to the
incoming H3iFrame if the H3iFrame contains all Headers
in this frame. In other words, this can be considered equivalent
to other if other contains a superset of this’s Headers.
This allows users for fuzzy-matching on header frames without needing to supply every individual header on the frame.
Sourcepub fn new_with_comparator<F>(stream_id: u64, comparator_fn: F) -> Self
pub fn new_with_comparator<F>(stream_id: u64, comparator_fn: F) -> Self
Create a new CloseTriggerFrame which will match incoming
H3iFrames according to the passed comparator_fn.
The comparator_fn will be called with every incoming H3iFrame. It
should return true if the incoming frame is expected, and false
if it is not.
Trait Implementations§
Source§impl Clone for CloseTriggerFrame
impl Clone for CloseTriggerFrame
Source§fn clone(&self) -> CloseTriggerFrame
fn clone(&self) -> CloseTriggerFrame
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CloseTriggerFrame
impl Debug for CloseTriggerFrame
Source§impl PartialEq for CloseTriggerFrame
impl PartialEq for CloseTriggerFrame
Auto Trait Implementations§
impl Freeze for CloseTriggerFrame
impl !RefUnwindSafe for CloseTriggerFrame
impl Send for CloseTriggerFrame
impl Sync for CloseTriggerFrame
impl Unpin for CloseTriggerFrame
impl !UnwindSafe for CloseTriggerFrame
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)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