pub struct ServeWorld<S> { /* private fields */ }
Expand description
A serving function to use with ::tarpc::server::InFlightRequest::execute.
Trait Implementations§
Source§impl<S: Clone> Clone for ServeWorld<S>
impl<S: Clone> Clone for ServeWorld<S>
Source§fn clone(&self) -> ServeWorld<S>
fn clone(&self) -> ServeWorld<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 ServeWorld<S>where
S: World,
impl<S> Serve for ServeWorld<S>where
S: World,
Source§type Req = WorldRequest
type Req = WorldRequest
Type of request.
Source§type Resp = WorldResponse
type Resp = WorldResponse
Type of response.
Source§async fn serve(
self,
ctx: Context,
req: WorldRequest,
) -> Result<WorldResponse, ServerError>
async fn serve( self, ctx: Context, req: WorldRequest, ) -> Result<WorldResponse, ServerError>
Responds to a single request.
Auto Trait Implementations§
impl<S> Freeze for ServeWorld<S>where
S: Freeze,
impl<S> RefUnwindSafe for ServeWorld<S>where
S: RefUnwindSafe,
impl<S> Send for ServeWorld<S>where
S: Send,
impl<S> Sync for ServeWorld<S>where
S: Sync,
impl<S> Unpin for ServeWorld<S>where
S: Unpin,
impl<S> UnwindSafe for ServeWorld<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<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
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