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>>;
}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>>
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".