Trait json_rpc2::futures::Service[][src]

pub trait Service: Send + Sync {
    type Data: Send + Sync;
#[must_use]    fn handle<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        request: &'life1 mut Request,
        ctx: &'life2 Self::Data
    ) -> Pin<Box<dyn Future<Output = Result<Option<Response>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
; }

Trait for async services that maybe handle a request.

Only available with the async feature.

Associated Types

type Data: Send + Sync[src]

Type of the user data for this service.

Loading content...

Required methods

#[must_use]fn handle<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    request: &'life1 mut Request,
    ctx: &'life2 Self::Data
) -> Pin<Box<dyn Future<Output = Result<Option<Response>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 
[src]

See Service for more information.

Loading content...

Implementors

Loading content...