pub struct RpcServer<'a, RPC: RpcServerHandler<'a>, M, SRC, R> { /* private fields */ }Expand description
JSON RPC server
Implementations§
Source§impl<'a, RPC: RpcServerHandler<'a, Method = M, Result = R, Source = SRC>, M, SRC, R> RpcServer<'a, RPC, M, SRC, R>
impl<'a, RPC: RpcServerHandler<'a, Method = M, Result = R, Source = SRC>, M, SRC, R> RpcServer<'a, RPC, M, SRC, R>
Sourcepub fn handle_request(
&'a self,
request: Request<M>,
source: SRC,
) -> Option<Response<R>>
pub fn handle_request( &'a self, request: Request<M>, source: SRC, ) -> Option<Response<R>>
Handle a JSON RPC request
Sourcepub fn handle_request_payload<D>(
&'a self,
payload: &'a [u8],
source: SRC,
) -> Option<Vec<u8>>where
D: DataFormat,
pub fn handle_request_payload<D>(
&'a self,
payload: &'a [u8],
source: SRC,
) -> Option<Vec<u8>>where
D: DataFormat,
Handle a JSON RPC request from a payload
Auto Trait Implementations§
impl<'a, RPC, M, SRC, R> Freeze for RpcServer<'a, RPC, M, SRC, R>where
RPC: Freeze,
impl<'a, RPC, M, SRC, R> RefUnwindSafe for RpcServer<'a, RPC, M, SRC, R>
impl<'a, RPC, M, SRC, R> Send for RpcServer<'a, RPC, M, SRC, R>
impl<'a, RPC, M, SRC, R> Sync for RpcServer<'a, RPC, M, SRC, R>
impl<'a, RPC, M, SRC, R> Unpin for RpcServer<'a, RPC, M, SRC, R>
impl<'a, RPC, M, SRC, R> UnsafeUnpin for RpcServer<'a, RPC, M, SRC, R>where
RPC: UnsafeUnpin,
impl<'a, RPC, M, SRC, R> UnwindSafe for RpcServer<'a, RPC, M, SRC, R>
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