Trait ConnectionProfileCompiler
pub trait ConnectionProfileCompiler<Input>:
Send
+ Sync
+ 'static {
type Compiled: CompiledConnectionProfile;
// Required methods
fn ech_ready(&self, input: &Input) -> bool;
fn compile(
&self,
input: &Input,
selection: &ConnectionSelection,
components: &mut PreparedConnectionComponents,
) -> Result<Self::Compiled, Box<dyn Error + Sync + Send>>;
}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 ech_ready(&self, input: &Input) -> bool
fn ech_ready(&self, input: &Input) -> bool
Whether endpoint discovery and caller policy permit a matched ECH pair. This performs no I/O; native connectors finalize endpoint readiness before TLS. Missing or invalid endpoint policy returns false. The native connector remains responsible for reporting policy errors with its usual error kind.
fn compile(
&self,
input: &Input,
selection: &ConnectionSelection,
components: &mut PreparedConnectionComponents,
) -> Result<Self::Compiled, Box<dyn Error + Sync + Send>>
fn compile( &self, input: &Input, selection: &ConnectionSelection, components: &mut PreparedConnectionComponents, ) -> Result<Self::Compiled, Box<dyn Error + Sync + Send>>
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".