Trait TryRefIntoTransportContext
pub trait TryRefIntoTransportContext<State> {
type Error;
// Required method
fn try_ref_into_transport_ctx(
&self,
ctx: &Context<State>,
) -> Result<TransportContext, Self::Error>;
}
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§
type Error
type Error
The error that can happen when trying to turn the self reference into the TransportContext.
Required Methods§
fn 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.