Skip to main content

ConnectionProfileCompiler

Trait ConnectionProfileCompiler 

pub trait ConnectionProfileCompiler<Input>:
    Send
    + Sync
    + 'static {
    type Compiled: CompiledConnectionProfile;

    // Required method
    fn compile(
        &self,
        input: &Input,
        selection: &ConnectionSelection,
        components: &mut PreparedConnectionComponents,
    ) -> Result<Self::Compiled, Box<dyn Error + Send + Sync>>;
}
Available on crate features std and ua only.
Expand description

Compile backend-specific connection pieces without connection I/O.

The default () compiler prepares no additional components. A backend owns validation of its native configuration and current request bindings. Errors stop connection establishment and are reserved for malformed captures; a capture the backend cannot replay safely is left uncompiled, falling back to native behaviour, and the lowering is recorded in the components’ report.

The returned value is applied only after every required component and the built-in HTTP settings have passed their preservation checks.

Required Associated Types§

Required Methods§

fn compile( &self, input: &Input, selection: &ConnectionSelection, components: &mut PreparedConnectionComponents, ) -> Result<Self::Compiled, Box<dyn Error + Send + Sync>>

Prepare selection from its decoded components. Current connection bindings come from input; record lowered items in the components’ report. Move consumed components into the compiled output instead of cloning them. Admission still checks every slot in the original selection.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

§

impl<Input> ConnectionProfileCompiler<Input> for ()

§

type Compiled = ()

§

fn compile( &self, _input: &Input, _selection: &ConnectionSelection, _components: &mut PreparedConnectionComponents, ) -> Result<(), Box<dyn Error + Send + Sync>>

Implementors§

§

impl<Input> ConnectionProfileCompiler<Input> for rama::quic::profile::replay::ConnectionProfileCompiler

§

impl<Input> ConnectionProfileCompiler<Input> for rama::tls::boring::client::profile::compiler::ConnectionProfileCompiler