pub struct ServeFunctionService<S> { /* private fields */ }
Expand description
A serving function to use with ::tarpc::server::InFlightRequest::execute.
Trait Implementations§
Source§impl<S: Clone> Clone for ServeFunctionService<S>
impl<S: Clone> Clone for ServeFunctionService<S>
Source§fn clone(&self) -> ServeFunctionService<S>
fn clone(&self) -> ServeFunctionService<S>
Returns a duplicate 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<S> Serve for ServeFunctionService<S>where
S: FunctionService,
impl<S> Serve for ServeFunctionService<S>where
S: FunctionService,
Source§type Req = FunctionServiceRequest
type Req = FunctionServiceRequest
Type of request.
Source§type Resp = FunctionServiceResponse
type Resp = FunctionServiceResponse
Type of response.
Source§async fn serve(
self,
ctx: Context,
req: FunctionServiceRequest,
) -> Result<FunctionServiceResponse, ServerError>
async fn serve( self, ctx: Context, req: FunctionServiceRequest, ) -> Result<FunctionServiceResponse, ServerError>
Responds to a single request.
Auto Trait Implementations§
impl<S> Freeze for ServeFunctionService<S>where
S: Freeze,
impl<S> RefUnwindSafe for ServeFunctionService<S>where
S: RefUnwindSafe,
impl<S> Send for ServeFunctionService<S>where
S: Send,
impl<S> Sync for ServeFunctionService<S>where
S: Sync,
impl<S> Unpin for ServeFunctionService<S>where
S: Unpin,
impl<S> UnwindSafe for ServeFunctionService<S>where
S: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<S> RequestHook for Swhere
S: Serve,
impl<S> RequestHook for Swhere
S: Serve,
Source§fn before<Hook>(self, hook: Hook) -> HookThenServe<Self, Hook>
fn before<Hook>(self, hook: Hook) -> HookThenServe<Self, Hook>
Runs a hook before execution of the request. Read more
Source§fn after<Hook>(self, hook: Hook) -> ServeThenHook<Self, Hook>
fn after<Hook>(self, hook: Hook) -> ServeThenHook<Self, Hook>
Runs a hook after completion of a request. Read more
Source§fn before_and_after<Hook>(
self,
hook: Hook,
) -> HookThenServeThenHook<Self::Req, Self::Resp, Self, Hook>
fn before_and_after<Hook>( self, hook: Hook, ) -> HookThenServeThenHook<Self::Req, Self::Resp, Self, Hook>
Runs a hook before and after execution of the request. Read more