pub trait Endpoint:
    Send
    + Sync
    + 'static {
    // Required method
    fn apply<'life0, 'async_trait>(
        self: Pin<&'life0 Self>,
        request: Request,
    ) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}Expand description
Required Methods§
Sourcefn apply<'life0, 'async_trait>(
    self: Pin<&'life0 Self>,
    request: Request,
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
 
fn apply<'life0, 'async_trait>(
    self: Pin<&'life0 Self>,
    request: Request,
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
Transforms the request into the response. However, a request may fail, and such a failure can be handled by down the stack.