Trait rok::endpoint::Endpoint[][src]

pub trait Endpoint: Send + Sync + 'static {
#[must_use]    fn call<'life0, 'async_trait>(
        &'life0 self,
        req: Request
    ) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }

Required methods

#[must_use]fn call<'life0, 'async_trait>(
    &'life0 self,
    req: Request
) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Invoke the endpoint within the given context

Loading content...

Implementors

impl<F: Send + Sync + 'static, Fut, Res> Endpoint for F where
    F: Fn(Request) -> Fut,
    Fut: Future<Output = Res> + Send + 'static,
    Res: Into<Response> + 'static, 
[src]

Loading content...