Struct ConnectionPreparation
pub struct ConnectionPreparation { /* private fields */ }std and ua only.Expand description
Locally owned result of one connection draw and whole-profile admission.
Implementations§
§impl ConnectionPreparation
impl ConnectionPreparation
pub fn selection(&self) -> &ConnectionSelection
pub fn selection(&self) -> &ConnectionSelection
The connection variant that passed whole-profile admission.
pub fn prepare<C>(
input: &impl ExtensionsRef,
compile: impl FnOnce(&ConnectionSelection, &mut PreparedConnectionComponents) -> Result<C, Box<dyn Error + Sync + Send>>,
) -> Result<Option<(ConnectionPreparation, C)>, Box<dyn Error + Sync + Send>>where
C: CompiledConnectionProfile,
pub fn prepare<C>(
input: &impl ExtensionsRef,
compile: impl FnOnce(&ConnectionSelection, &mut PreparedConnectionComponents) -> Result<C, Box<dyn Error + Sync + Send>>,
) -> Result<Option<(ConnectionPreparation, C)>, Box<dyn Error + Sync + Send>>where
C: CompiledConnectionProfile,
Decode once and compile against the consumer’s current input. Ordinary
traffic returns None without drawing, decoding or invoking compile.
pub fn prepare_with_ech<C>(
input: &impl ExtensionsRef,
ech: bool,
compile: impl FnOnce(&ConnectionSelection, &mut PreparedConnectionComponents) -> Result<C, Box<dyn Error + Sync + Send>>,
) -> Result<Option<(ConnectionPreparation, C)>, Box<dyn Error + Sync + Send>>where
C: CompiledConnectionProfile,
pub fn prepare_with_ech<C>(
input: &impl ExtensionsRef,
ech: bool,
compile: impl FnOnce(&ConnectionSelection, &mut PreparedConnectionComponents) -> Result<C, Box<dyn Error + Sync + Send>>,
) -> Result<Option<(ConnectionPreparation, C)>, Box<dyn Error + Sync + Send>>where
C: CompiledConnectionProfile,
Prepare a matched ECH connection when the backend has already resolved endpoint configuration and caller intent. The same draw survives retries.
pub fn apply_reprepared_http(
selection: ConnectionSelection,
components: PreparedConnectionComponents,
input: &impl ExtensionsRef,
) -> Result<ProfilePreservationReport, Box<dyn Error + Sync + Send>>
pub fn apply_reprepared_http( selection: ConnectionSelection, components: PreparedConnectionComponents, input: &impl ExtensionsRef, ) -> Result<ProfilePreservationReport, Box<dyn Error + Sync + Send>>
Apply the HTTP components belonging to the offer selected at final TLS preparation.
pub fn apply_http(
&mut self,
input: &impl ExtensionsRef,
) -> Result<(), Box<dyn Error + Sync + Send>>
pub fn apply_http( &mut self, input: &impl ExtensionsRef, ) -> Result<(), Box<dyn Error + Sync + Send>>
Apply admitted HTTP recipes before the HTTP connector reads them. Native TLS/QUIC configuration is deliberately absent from the request store.
pub fn check_context<'a>(
&self,
input: &'a Extensions,
) -> Result<&'a EmulationContext, Box<dyn Error + Sync + Send>>
pub fn check_context<'a>( &self, input: &'a Extensions, ) -> Result<&'a EmulationContext, Box<dyn Error + Sync + Send>>
Validate the admitted selection again after an inner transport returns. A changed context must be rejected before any prepared native output.
pub fn publish(
self,
input: &Extensions,
connection: &Extensions,
version: Option<Version>,
) -> Result<(), Box<dyn Error + Sync + Send>>
pub fn publish( self, input: &Extensions, connection: &Extensions, version: Option<Version>, ) -> Result<(), Box<dyn Error + Sync + Send>>
Publish the admitted selection and report. A negotiated HTTP version also validates protocol support and installs the profile’s HTTP reuse witness. Other consumers must supply their own conservative transport reuse policy.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ConnectionPreparation
impl Forget for ConnectionPreparation
impl Move for ConnectionPreparation
impl RefUnwindSafe for ConnectionPreparation
impl Send for ConnectionPreparationwhere
Bytes: Send,
BoxRaw<[Option<ReservedSettingGenerator>]>: Send,
BoxRaw<[u16]>: Send,
BoxRaw<[u8]>: Send,
BoxRaw<[TlsCapturedExtension]>: Send,
BoxRaw<[OrderedProtocolField]>: Send,
Arc<[EarlyFrame]>: Send,
RawVecInner: Send,
BoxRaw<[H3CapturedEvent]>: Send,
BoxRaw<[ObservedEncoderInstruction]>: Send,
BoxRaw<[ProfilePreservationDifference]>: Send,
impl Sync for ConnectionPreparationwhere
Bytes: Sync,
BoxRaw<[Option<ReservedSettingGenerator>]>: Sync,
BoxRaw<[u16]>: Sync,
BoxRaw<[u8]>: Sync,
BoxRaw<[TlsCapturedExtension]>: Sync,
BoxRaw<[OrderedProtocolField]>: Sync,
Arc<[EarlyFrame]>: Sync,
RawVecInner: Sync,
BoxRaw<[H3CapturedEvent]>: Sync,
BoxRaw<[ObservedEncoderInstruction]>: Sync,
BoxRaw<[ProfilePreservationDifference]>: Sync,
impl Unpin for ConnectionPreparationwhere
*const u8: Unpin,
Align8<*mut ()>: Unpin,
&'static Vtable: Unpin,
Box<[Option<ReservedSettingGenerator>]>: Unpin,
Box<[u16]>: Unpin,
Box<[u8]>: Unpin,
Box<[TlsCapturedExtension]>: Unpin,
Box<[OrderedProtocolField]>: Unpin,
Arc<[EarlyFrame]>: Unpin,
*const u8 is !null: Unpin,
Box<[H3CapturedEvent]>: Unpin,
Box<[ObservedEncoderInstruction]>: Unpin,
Box<[ProfilePreservationDifference]>: Unpin,
impl UnsafeUnpin for ConnectionPreparationwhere
*const u8: UnsafeUnpin,
Align8<*mut ()>: UnsafeUnpin,
&'static Vtable: UnsafeUnpin,
*const [Option<ReservedSettingGenerator>] is !null: UnsafeUnpin,
PhantomData<[Option<ReservedSettingGenerator>]>: UnsafeUnpin,
*const [u16] is !null: UnsafeUnpin,
PhantomData<[u16]>: UnsafeUnpin,
*const [u8] is !null: UnsafeUnpin,
PhantomData<[u8]>: UnsafeUnpin,
*const [TlsCapturedExtension] is !null: UnsafeUnpin,
PhantomData<[TlsCapturedExtension]>: UnsafeUnpin,
*const [OrderedProtocolField] is !null: UnsafeUnpin,
PhantomData<[OrderedProtocolField]>: UnsafeUnpin,
*const ArcInner<[EarlyFrame]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[EarlyFrame]>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Vec<ObservedFrame>>: UnsafeUnpin,
PhantomData<TransportParameterId>: UnsafeUnpin,
PhantomData<Version>: UnsafeUnpin,
PhantomData<u64>: UnsafeUnpin,
*const [H3CapturedEvent] is !null: UnsafeUnpin,
PhantomData<[H3CapturedEvent]>: UnsafeUnpin,
*const [ObservedEncoderInstruction] is !null: UnsafeUnpin,
PhantomData<[ObservedEncoderInstruction]>: UnsafeUnpin,
PhantomData<ObservedInsertionBinding>: UnsafeUnpin,
*const [ProfilePreservationDifference] is !null: UnsafeUnpin,
PhantomData<[ProfilePreservationDifference]>: UnsafeUnpin,
impl UnwindSafe for ConnectionPreparationwhere
*const u8: UnwindSafe,
Align8<*mut ()>: UnwindSafe,
&'static Vtable: UnwindSafe,
BoxRaw<[Option<ReservedSettingGenerator>]>: UnwindSafe,
BoxRaw<[u16]>: UnwindSafe,
BoxRaw<[u8]>: UnwindSafe,
BoxRaw<[TlsCapturedExtension]>: UnwindSafe,
BoxRaw<[OrderedProtocolField]>: UnwindSafe,
Arc<[EarlyFrame]>: UnwindSafe,
RawVecInner: UnwindSafe,
BoxRaw<[H3CapturedEvent]>: UnwindSafe,
BoxRaw<[ObservedEncoderInstruction]>: UnwindSafe,
BoxRaw<[ProfilePreservationDifference]>: UnwindSafe,
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
§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