Trait anansi_core::web::Service

source ·
pub trait Service<R: BaseRequest>: Send + Sync {
    type S: Service<R>;

    // Required methods
    fn init<'life0, 'async_trait>(
        service: Self::S,
        settings: &'life0 Settings
    ) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn call<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        view: &'life1 View<R>,
        req: &'life2 mut R
    ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}

Required Associated Types§

source

type S: Service<R>

Required Methods§

source

fn init<'life0, 'async_trait>( service: Self::S, settings: &'life0 Settings ) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn call<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, view: &'life1 View<R>, req: &'life2 mut R ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Implementors§

source§

impl<R: BaseRequest> Service<R> for ViewService

source§

impl<Svc: Service<R>, R: BaseRequest> Service<R> for SecurityHeaders<Svc>

§

type S = Svc