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>

source

pub fn new() -> Self

Trait Implementations§

source§

impl<P: Clone, R: Clone, RS: Clone> Clone for NullServiceProcessor<P, R, RS>

source§

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)

Performs copy-assignment from source. Read more
source§

impl<P: Debug, R: Debug, RS: Debug> Debug for NullServiceProcessor<P, R, RS>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<P, R, RS> Default for NullServiceProcessor<P, R, RS>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

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

§

type RequestContext = R

§

type ReplyState = RS

source§

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,

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>

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>>

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,

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,

§

type Handler = ()

§

type RequestContext = R

§

type ReplyState = RS

source§

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,

source§

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]

Returns function names this thrift service is able to handle, similar to the keys of C++’s createMethodMetadata(). Read more
source§

fn on_termination<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Applies to interactions only 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>
where P: Send, R: Send, RS: Send,

§

impl<P, R, RS> Sync for NullServiceProcessor<P, R, RS>
where P: Sync, R: Sync, RS: Sync,

§

impl<P, R, RS> Unpin for NullServiceProcessor<P, R, RS>
where P: Unpin, R: Unpin, RS: Unpin,

§

impl<P, R, RS> UnwindSafe for NullServiceProcessor<P, R, RS>
where P: UnwindSafe, R: UnwindSafe, RS: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.