Struct Settings
pub struct Settings { /* private fields */ }http and std only.Expand description
An ordered collection of HTTP/3 settings (RFC 9114 §7.2.4).
Order is preserved so that a caller reproducing a specific wire image (a fingerprint profile, for example) can control it. Duplicate identifiers — known, unknown or reserved — are rejected, and the HTTP/2-forbidden identifiers are rejected, both as required by RFC 9114 §7.2.4.1.
Implementations§
§impl Settings
impl Settings
pub fn qpack_max_table_capacity(&self) -> u64
pub fn qpack_max_table_capacity(&self) -> u64
SETTINGS_QPACK_MAX_TABLE_CAPACITY, defaulting to 0 (RFC 9204 §5).
pub fn qpack_blocked_streams(&self) -> u64
pub fn qpack_blocked_streams(&self) -> u64
SETTINGS_QPACK_BLOCKED_STREAMS, defaulting to 0 (RFC 9204 §5).
pub fn max_field_section_size(&self) -> Option<u64>
pub fn max_field_section_size(&self) -> Option<u64>
SETTINGS_MAX_FIELD_SECTION_SIZE, defaulting to unlimited (None; RFC 9114 §7.2.4.1).
pub fn insert(&mut self, setting: Setting) -> Result<(), SettingsError>
pub fn insert(&mut self, setting: Setting) -> Result<(), SettingsError>
Append a setting, rejecting duplicates and HTTP/2-forbidden identifiers.
pub fn set(&mut self, id: SettingId, value: u64) -> Result<(), SettingsError>
pub fn set(&mut self, id: SettingId, value: u64) -> Result<(), SettingsError>
Append a setting by identifier and value; see Settings::insert.
pub fn encode_payload<B>(&self, dst: &mut B) -> Option<()>where
B: BufMut,
pub fn encode_payload<B>(&self, dst: &mut B) -> Option<()>where
B: BufMut,
Encode the settings payload (the entries, without the frame header) into dst.
Returns None without writing if any identifier or value exceeds the variable-length
integer range.
pub fn payload_len(&self) -> Option<usize>
pub fn payload_len(&self) -> Option<usize>
The encoded byte length of the settings payload, or None if a value is out of range.
pub fn decode(src: &[u8]) -> Result<Settings, SettingsError>
pub fn decode(src: &[u8]) -> Result<Settings, SettingsError>
Decode a complete SETTINGS payload from src, using DEFAULT_MAX_SETTINGS_ENTRIES.
src must contain exactly the frame payload; the caller (which owns framing) is responsible
for having buffered len bytes and for bounding len before doing so.
pub fn decode_with_limit(
src: &[u8],
max_entries: usize,
) -> Result<Settings, SettingsError>
pub fn decode_with_limit( src: &[u8], max_entries: usize, ) -> Result<Settings, SettingsError>
Decode a complete SETTINGS payload, accepting at most max_entries entries.
Trait Implementations§
impl Eq for Settings
impl StructuralPartialEq for Settings
Auto Trait Implementations§
impl Freeze for Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnsafeUnpin for Settings
impl UnwindSafe for Settings
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more