Struct Config
pub struct Config {Show 17 fields
pub early_requests: bool,
pub observation: Option<Box<ObservationLimits>>,
pub settings_profile: Option<Arc<Settings>>,
pub critical_streams: Preferences,
pub client_control: Option<Arc<ClientControlPreferences>>,
pub decoder: DecoderConfig,
pub encoder: EncoderConfig,
pub max_requests: usize,
pub header_read_timeout: Option<HeaderReadTimeout>,
pub idle_timeout: Option<IdleTimeout>,
pub max_pushes: usize,
pub max_frame_size: usize,
pub read_chunk_size: usize,
pub max_pending_uni_streams: usize,
pub extended_connect: bool,
pub datagrams: Option<DatagramConfig>,
pub strict_connect_framing: bool,
}http-backend and http and std only.Expand description
Local HTTP/3 connection budgets. Peer limits are negotiated independently.
Fields§
§early_requests: boolSend safe client requests without a body using TLS early keys, before confirmation.
Applies to client connections taken through Connecting::into_0rtt; other requests
still wait for handshake confirmation. Early requests use default peer SETTINGS
(RFC 9114 section 7.2.4.2). A server rejecting early data fails the connection with
Error::is_early_data_rejected: none of its requests were processed. Rama’s HTTP/3
connector always completes the handshake first. Servers ignore this: they always hold
request dispatch until the client’s Finished is verified. Disabled by default.
observation: Option<Box<ObservationLimits>>Optional independent budgets for wire observation; disabled by default.
settings_profile: Option<Arc<Settings>>Optional literal SETTINGS order, including unknown and reserved identifiers.
QPACK values must match decoder; an omitted QPACK setting means zero.
An explicit field-section limit must match the decoder’s local limit.
Server Extended CONNECT must match the application’s capability;
datagrams must match negotiated transport support. Client
ENABLE_CONNECT_PROTOCOL values are preserved but grant no permission.
Incompatible profiles fail before HTTP/3 control bytes are emitted.
Ordinary connections allocate no profile.
critical_streams: PreferencesQPACK stream allocation order and whether idle type prefixes are sent.
client_control: Option<Arc<ClientControlPreferences>>Additional client frames after SETTINGS; disabled by default.
decoder: DecoderConfigLocal QPACK decoder limits, advertised where the protocol defines settings.
encoder: EncoderConfigLocal encoder budgets. Peer capacity/blocked-stream settings override those fields.
max_requests: usizeMaximum concurrent application requests retained by the engine.
header_read_timeout: Option<HeaderReadTimeout>Deadline for incomplete server request heads, including blocked QPACK sections.
None disables the deadline.
idle_timeout: Option<IdleTimeout>Server connection idle budgets. None disables the deadline.
max_pushes: usizeLifetime push quota; zero disables push. Bounds reordered push state.
max_frame_size: usizeMaximum buffered encoded non-DATA frame.
This local wire-memory budget is independent of the decoded field-section size advertised in SETTINGS. QPACK literals can expand on the wire, so exceeding this bound is excessive load even for an otherwise valid field section (RFC 9114 §10.5.1). Increase both limits for large-header peers.
read_chunk_size: usizeMaximum QUIC chunk held by a stream reader.
max_pending_uni_streams: usizeMaximum unclassified peer unidirectional streams retained simultaneously.
extended_connect: boolAccept Extended CONNECT (RFC 9220) as a server, advertising
SETTINGS_ENABLE_CONNECT_PROTOCOL. The service decides which :protocol
tokens it serves; RFC 9220 §3 recommends 501 for others.
datagrams: Option<DatagramConfig>Receive HTTP/3 datagrams (RFC 9297). When QUIC DATAGRAM is negotiated this advertises
SETTINGS_H3_DATAGRAM, as RFC 9297 §2.1.1 recommends for every endpoint able to
receive them; None never advertises nor delivers them. A request only has datagram
semantics once declared with
HttpDatagrams.
strict_connect_framing: boolReject, rather than drop, Content-Length or Transfer-Encoding on a successful response to CONNECT,
which RFC 9110 §9.3.6 forbids as a tunnel follows the response.
Implementations§
§impl Config
impl Config
pub fn try_with_client_settings(
&self,
settings: Arc<Settings>,
) -> Result<Config, Error>
pub fn try_with_client_settings( &self, settings: Arc<Settings>, ) -> Result<Config, Error>
Apply literal client SETTINGS within this configuration’s receive budgets.
Omitted QPACK values mean zero. The profile can lower configured limits; larger values are lowered to them and a datagram grant this configuration disables is dropped, keeping the order of every other entry. An omitted field-section limit keeps the local finite resource budget. Client ENABLE_CONNECT_PROTOCOL values are retained without enabling Extended CONNECT: only the server’s setting grants that permission.
pub fn try_with_server_settings(
&self,
settings: Arc<Settings>,
) -> Result<Config, Error>
pub fn try_with_server_settings( &self, settings: Arc<Settings>, ) -> Result<Config, Error>
Apply literal server SETTINGS within existing receive budgets and capabilities.
Omitted QPACK values mean zero. An Extended CONNECT grant without the local capability is dropped; a false or omitted value disables it. Datagram policy and receive budgets cannot be enabled or raised by the supplied settings. The native handshake also drops grants the QUIC transport cannot carry.
pub fn try_set_client_controls(
&mut self,
preferences: Option<Arc<ClientControlPreferences>>,
) -> Result<(), Error>
pub fn try_set_client_controls( &mut self, preferences: Option<Arc<ClientControlPreferences>>, ) -> Result<(), Error>
Set optional client control frames, dropping trailing frames past this configuration’s frame-count and byte budgets with a trace. An invalid frame leaves the existing configuration unchanged.
pub fn configure_transport(
&self,
transport: &mut TransportConfig,
) -> Result<(), Error>
pub fn configure_transport( &self, transport: &mut TransportConfig, ) -> Result<(), Error>
Apply finite HTTP/3 receive budgets to a QUIC transport configuration. Configure the endpoint before establishing connections.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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<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