rama::service::handler

Trait FromContextRequest

pub trait FromContextRequest<State, Request>: Send + 'static {
    // Required method
    fn from_context_request(ctx: Context<State>, req: Request) -> Self;
}
Expand description

Convert a context+request into a parameter for the ServiceFn handler function.

Required Methods§

fn from_context_request(ctx: Context<State>, req: Request) -> Self

Convert a context+request into a parameter for the ServiceFn handler function.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl<State, Request> FromContextRequest<State, Request> for ((), Request)
where State: Clone + Send + Sync + 'static, Request: Send + 'static,

§

fn from_context_request(_ctx: Context<State>, req: Request) -> ((), Request)

§

impl<State, Request> FromContextRequest<State, Request> for (Context<State>, Request)
where State: Clone + Send + Sync + 'static, Request: Send + 'static,

§

fn from_context_request( ctx: Context<State>, req: Request, ) -> (Context<State>, Request)

§

impl<State, Request> FromContextRequest<State, Request> for ()

§

fn from_context_request(_ctx: Context<State>, _req: Request)

Implementors§