pub trait ServiceProcessor<P>where
    P: Protocol,
{ type RequestContext; type ReplyState; fn method_idx(&self, name: &[u8]) -> Result<usize, ApplicationException>; fn handle_method<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        idx: usize,
        request: &'life1 mut P::Deserializer,
        req_ctxt: &'life2 Self::RequestContext,
        reply_state: Arc<Mutex<Self::ReplyState>>,
        seqid: u32
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait
; fn create_interaction_idx(&self, _name: &str) -> Result<usize> { ... } fn handle_create_interaction(
        &self,
        _idx: usize
    ) -> Result<Arc<dyn ThriftService<P::Frame, Handler = (), RequestContext = Self::RequestContext, ReplyState = Self::ReplyState> + Send + 'static>> { ... } }
Expand description

Trait implemented by a generated type to implement a service.

Required Associated Types§

Required Methods§

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

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.

Provided Methods§

Given a method name, return a reference to the interaction creation fn for that index

Given a creation method index, it produces a fresh interaction processor

Implementors§