Struct fbthrift_git::processor::NullServiceProcessor
source · pub struct NullServiceProcessor<P, R, RS> { /* private fields */ }
Expand description
Null processor which implements no methods - it acts as the super for any service which has no super-service.
Implementations§
source§impl<P, R, RS> NullServiceProcessor<P, R, RS>
impl<P, R, RS> NullServiceProcessor<P, R, RS>
Trait Implementations§
source§impl<P: Clone, R: Clone, RS: Clone> Clone for NullServiceProcessor<P, R, RS>
impl<P: Clone, R: Clone, RS: Clone> Clone for NullServiceProcessor<P, R, RS>
source§fn clone(&self) -> NullServiceProcessor<P, R, RS>
fn clone(&self) -> NullServiceProcessor<P, R, RS>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<P, R, RS> Default for NullServiceProcessor<P, R, RS>
impl<P, R, RS> Default for NullServiceProcessor<P, R, RS>
source§impl<P, R, RS> ServiceProcessor<P> for NullServiceProcessor<P, R, RS>
impl<P, R, RS> ServiceProcessor<P> for NullServiceProcessor<P, R, RS>
type RequestContext = R
type ReplyState = RS
source§fn method_idx(&self, name: &[u8]) -> Result<usize, ApplicationException>
fn method_idx(&self, name: &[u8]) -> Result<usize, ApplicationException>
Given a method name, return a reference to the processor for that index.
source§fn handle_method<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_idx: usize,
_d: &'life1 mut P::Deserializer,
_req: ProtocolDecoded<P>,
_req_ctxt: &'life2 R,
_reply_state: Arc<Mutex<RS>>,
_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 handle_method<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_idx: usize,
_d: &'life1 mut P::Deserializer,
_req: ProtocolDecoded<P>,
_req_ctxt: &'life2 R,
_reply_state: Arc<Mutex<RS>>,
_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,
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.source§fn create_interaction_idx(&self, name: &str) -> Result<usize>
fn create_interaction_idx(&self, name: &str) -> Result<usize>
Given a method name, return a reference to the interaction creation fn for that index
source§fn handle_create_interaction(
&self,
_idx: usize
) -> Result<Arc<dyn ThriftService<P::Frame, Handler = (), RequestContext = Self::RequestContext, ReplyState = Self::ReplyState> + Send + 'static>>
fn handle_create_interaction( &self, _idx: usize ) -> Result<Arc<dyn ThriftService<P::Frame, Handler = (), RequestContext = Self::RequestContext, ReplyState = Self::ReplyState> + Send + 'static>>
Given a creation method index, it produces a fresh interaction processor
source§fn handle_on_termination<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_on_termination<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
See ThriftService::on_termination docs
source§impl<P, R, RS> ThriftService<<P as Protocol>::Frame> for NullServiceProcessor<P, R, RS>where
P: Protocol + Send + Sync + 'static,
P::Frame: Send + 'static,
R: RequestContext<Name = CStr> + Send + Sync + 'static,
R::ContextStack: ContextStack<Name = CStr>,
RS: ReplyState<P::Frame> + Send + Sync + 'static,
impl<P, R, RS> ThriftService<<P as Protocol>::Frame> for NullServiceProcessor<P, R, RS>where
P: Protocol + Send + Sync + 'static,
P::Frame: Send + 'static,
R: RequestContext<Name = CStr> + Send + Sync + 'static,
R::ContextStack: ContextStack<Name = CStr>,
RS: ReplyState<P::Frame> + Send + Sync + 'static,
type Handler = ()
type RequestContext = R
type ReplyState = RS
fn call<'life0, 'life1, 'async_trait>(
&'life0 self,
req: ProtocolDecoded<P>,
rctxt: &'life1 R,
reply_state: Arc<Mutex<RS>>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_interaction( &self, name: &str ) -> Result<Arc<dyn ThriftService<P::Frame, Handler = Self::Handler, RequestContext = Self::RequestContext, ReplyState = Self::ReplyState> + Send + 'static>>
source§fn get_method_names(&self) -> &'static [&'static str]
fn get_method_names(&self) -> &'static [&'static str]
Returns function names this thrift service is able to handle, similar
to the keys of C++’s createMethodMetadata(). Read more
Auto Trait Implementations§
impl<P, R, RS> RefUnwindSafe for NullServiceProcessor<P, R, RS>
impl<P, R, RS> Send for NullServiceProcessor<P, R, RS>
impl<P, R, RS> Sync for NullServiceProcessor<P, R, RS>
impl<P, R, RS> Unpin for NullServiceProcessor<P, R, RS>
impl<P, R, RS> UnwindSafe for NullServiceProcessor<P, R, RS>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more