pub struct TracingConfigServer<S> { /* private fields */ }Expand description
Server dispatcher for the #trait_name service.
Integrate this with an RpcSession
by calling RpcSession::set_dispatcher
and forwarding method_id/payload into [dispatch] or [dispatch_streaming].
Implementations§
Source§impl<S: TracingConfig + Send + Sync + 'static> TracingConfigServer<S>
impl<S: TracingConfig + Send + Sync + 'static> TracingConfigServer<S>
Sourcepub async fn serve<T: Transport + 'static>(
self,
transport: Arc<T>,
) -> Result<(), RpcError>
pub async fn serve<T: Transport + 'static>( self, transport: Arc<T>, ) -> Result<(), RpcError>
Sourcepub async fn serve_one<T: Transport + 'static>(
&self,
transport: &T,
) -> Result<(), RpcError>
pub async fn serve_one<T: Transport + 'static>( &self, transport: &T, ) -> Result<(), RpcError>
Serve a single request from the transport.
This is useful for testing or when you want to handle each request individually.
Auto Trait Implementations§
impl<S> Freeze for TracingConfigServer<S>where
S: Freeze,
impl<S> RefUnwindSafe for TracingConfigServer<S>where
S: RefUnwindSafe,
impl<S> Send for TracingConfigServer<S>where
S: Send,
impl<S> Sync for TracingConfigServer<S>where
S: Sync,
impl<S> Unpin for TracingConfigServer<S>where
S: Unpin,
impl<S> UnwindSafe for TracingConfigServer<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