pub struct QpackEncoderInstructionApplier { /* private fields */ }Expand description
Applies one parsed QPACK encoder-stream instruction to a dynamic table.
Implementations§
Source§impl QpackEncoderInstructionApplier
impl QpackEncoderInstructionApplier
Sourcepub const fn new(maximum_dynamic_table_capacity: u64) -> Self
pub const fn new(maximum_dynamic_table_capacity: u64) -> Self
Creates an applier with the locally advertised maximum dynamic-table capacity.
Sourcepub const fn maximum_dynamic_table_capacity(self) -> u64
pub const fn maximum_dynamic_table_capacity(self) -> u64
Returns the locally advertised maximum permitted dynamic-table capacity.
Sourcepub fn apply<F>(
&self,
table: &mut QpackDynamicTable<'_, '_>,
instruction: QpackEncoderInstruction<'_>,
scratch: &mut [u8],
evictable: F,
) -> Result<QpackEncoderInstructionApplyOutcome, QpackEncoderInstructionApplyError>
pub fn apply<F>( &self, table: &mut QpackDynamicTable<'_, '_>, instruction: QpackEncoderInstruction<'_>, scratch: &mut [u8], evictable: F, ) -> Result<QpackEncoderInstructionApplyOutcome, QpackEncoderInstructionApplyError>
Applies one instruction using caller-owned scratch storage for decoded or copied bytes.
Scratch is unchanged when preflight fails. Once staging starts, a later rejected eviction
policy may leave scratch clobbered, while the table remains unchanged on every error.
Effects observed by evictable cannot be rolled back.
Sourcepub fn apply_sequence<F>(
&self,
table: &mut QpackDynamicTable<'_, '_>,
bytes: &[u8],
scratch: &mut [u8],
evictable: F,
) -> Result<(), QpackEncoderInstructionsApplyError>
pub fn apply_sequence<F>( &self, table: &mut QpackDynamicTable<'_, '_>, bytes: &[u8], scratch: &mut [u8], evictable: F, ) -> Result<(), QpackEncoderInstructionsApplyError>
Validates and applies a complete unframed encoder-stream instruction sequence.
The complete sequence is validated before any instruction is applied. On an application
failure, earlier successful instructions remain applied and later instructions are not
attempted. Scratch and evictable retain the per-instruction effects documented by
Self::apply.