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 + Send + Sync>>,
) -> Result<Option<(ConnectionPreparation, C)>, Box<dyn Error + Send + Sync>>where
C: CompiledConnectionProfile,
pub fn prepare<C>(
input: &impl ExtensionsRef,
compile: impl FnOnce(&ConnectionSelection, &mut PreparedConnectionComponents) -> Result<C, Box<dyn Error + Send + Sync>>,
) -> Result<Option<(ConnectionPreparation, C)>, Box<dyn Error + Send + Sync>>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 apply_http(
&mut self,
input: &impl ExtensionsRef,
) -> Result<(), Box<dyn Error + Send + Sync>>
pub fn apply_http( &mut self, input: &impl ExtensionsRef, ) -> Result<(), Box<dyn Error + Send + Sync>>
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 + Send + Sync>>
pub fn check_context<'a>( &self, input: &'a Extensions, ) -> Result<&'a EmulationContext, Box<dyn Error + Send + Sync>>
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 + Send + Sync>>
pub fn publish( self, input: &Extensions, connection: &Extensions, version: Option<Version>, ) -> Result<(), Box<dyn Error + Send + Sync>>
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 RefUnwindSafe for ConnectionPreparation
impl Send for ConnectionPreparation
impl Sync for ConnectionPreparation
impl Unpin for ConnectionPreparation
impl UnsafeUnpin for ConnectionPreparation
impl UnwindSafe for ConnectionPreparation
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