Trait fbthrift_git::processor::ServiceProcessor[][src]

pub trait ServiceProcessor<P> where
    P: Protocol
{ type RequestContext; fn method_idx(&self, name: &[u8]) -> Result<usize, ApplicationException>;
#[must_use] fn handle_method<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        idx: usize,
        request: &'life1 mut P::Deserializer,
        req_ctxt: &'life2 Self::RequestContext,
        seqid: u32
    ) -> Pin<Box<dyn Future<Output = Result<ProtocolEncodedFinal<P>, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
; }

Trait implemented by a generated type to implement a service.

Associated Types

Loading content...

Required methods

fn method_idx(&self, name: &[u8]) -> Result<usize, ApplicationException>[src]

Given a method name, return a reference to the processor for that index.

#[must_use]fn handle_method<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    idx: usize,
    request: &'life1 mut P::Deserializer,
    req_ctxt: &'life2 Self::RequestContext,
    seqid: u32
) -> Pin<Box<dyn Future<Output = Result<ProtocolEncodedFinal<P>, Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 
[src]

Given a method index and the remains of the message input, get a future for the result of the method. This will only be called if the corresponding method_idx() returns an (index, ServiceProcessor) tuple. frame is a reference to the frame containing the request. request is a deserializer instance set up to decode the request.

Loading content...

Implementors

impl<P, R> ServiceProcessor<P> for NullServiceProcessor<P, R> where
    P: Protocol + Sync,
    P::Deserializer: Send,
    R: Sync
[src]

type RequestContext = R

Loading content...