pub trait DynEndpoint: Send + Sync {
    type Output: IntoResponse;

    // Required method
    fn call(&self, req: Request) -> BoxFuture<'_, Result<Self::Output>>;
}
Expand description

A endpoint that can be dynamically dispatched.

Required Associated Types§

source

type Output: IntoResponse

Represents the response of the endpoint.

Required Methods§

source

fn call(&self, req: Request) -> BoxFuture<'_, Result<Self::Output>>

Get the response to the request.

Trait Implementations§

source§

impl<T> Endpoint for dyn DynEndpoint<Output = T> + '_
where T: IntoResponse,

§

type Output = T

Represents the response of the endpoint.
source§

async fn call(&self, req: Request) -> Result<Self::Output>

Get the response to the request.
source§

fn get_response(&self, req: Request) -> impl Future<Output = Response> + Send

Get the response to the request and return a Response. Read more

Implementors§

source§

impl<E> DynEndpoint for ToDynEndpoint<E>
where E: Endpoint,

§

type Output = <E as Endpoint>::Output