Struct geph4_protocol::client_exit::ClientExitService
source · pub struct ClientExitService<T: ClientExitProtocol>(pub T);
Expand description
Automatically generated struct that wraps any ‘business logic’ struct implementing ClientExitProtocol, and returns a JSON-RPC server implementing nanorpc::RpcService. See the ClientExitProtocol trait for further documentation.
Tuple Fields§
§0: T
Trait Implementations§
source§impl<__nrpc_T: ClientExitProtocol + Sync + Send + 'static> RpcService for ClientExitService<__nrpc_T>
impl<__nrpc_T: ClientExitProtocol + Sync + Send + 'static> RpcService for ClientExitService<__nrpc_T>
source§fn respond<'life0, 'life1, 'async_trait>(
&'life0 self,
__nrpc_method: &'life1 str,
__nrpc_args: Vec<Value>
) -> Pin<Box<dyn Future<Output = Option<Result<Value, ServerError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn respond<'life0, 'life1, 'async_trait>( &'life0 self, __nrpc_method: &'life1 str, __nrpc_args: Vec<Value> ) -> Pin<Box<dyn Future<Output = Option<Result<Value, ServerError>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Responds to an RPC call with method
str
and dynamically typed arguments args
. The service should return None
to indicate that this method does not exist at all.source§fn respond_raw<'life0, 'async_trait>(
&'life0 self,
jrpc_req: JrpcRequest
) -> Pin<Box<dyn Future<Output = JrpcResponse> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Self: 'async_trait,
fn respond_raw<'life0, 'async_trait>( &'life0 self, jrpc_req: JrpcRequest ) -> Pin<Box<dyn Future<Output = JrpcResponse> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,
Responds to a raw JSON-RPC request, returning a raw JSON-RPC response.
Auto Trait Implementations§
impl<T> RefUnwindSafe for ClientExitService<T>where T: RefUnwindSafe,
impl<T> Send for ClientExitService<T>where T: Send,
impl<T> Sync for ClientExitService<T>where T: Sync,
impl<T> Unpin for ClientExitService<T>where T: Unpin,
impl<T> UnwindSafe for ClientExitService<T>where T: 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