pub trait TryRefIntoTransportContext<State> {
type Error;
// Required method
fn try_ref_into_transport_ctx(
&self,
ctx: &Context<State>,
) -> Result<TransportContext, Self::Error>;
}Available on crate feature
http only.Expand description
Utility trait to support trait bounds where you wish
to turn combined types into a TransportContext,
not expressible with Into.
e.g. &Request: Into<TransportContext> would not work if it needs also Context and be a ref.
Required Associated Types§
Required Methods§
Sourcefn try_ref_into_transport_ctx(
&self,
ctx: &Context<State>,
) -> Result<TransportContext, Self::Error>
fn try_ref_into_transport_ctx( &self, ctx: &Context<State>, ) -> Result<TransportContext, Self::Error>
Try to turn the reference to self within the given context into the TransportContext.