Struct jsonrpc_v2::Server
source · pub struct Server<R> { /* private fields */ }
Expand description
Server/request handler
Implementations§
source§impl<R: Router> Server<R>
impl<R: Router> Server<R>
pub fn with_router(router: R) -> ServerBuilder<R>
source§impl<R> Server<R>where
R: Router + 'static,
impl<R> Server<R>where R: Router + 'static,
sourcepub fn handle<I: Into<RequestKind>>(
&self,
req: I
) -> impl Future<Output = ResponseObjects>
pub fn handle<I: Into<RequestKind>>( &self, req: I ) -> impl Future<Output = ResponseObjects>
Handle requests, and return appropriate responses
sourcepub fn into_actix_web_service(
self: Arc<Self>
) -> impl ServiceFactory<ServiceRequest, Response = ServiceResponse, Error = Error, Config = (), InitError = ()>
pub fn into_actix_web_service( self: Arc<Self> ) -> impl ServiceFactory<ServiceRequest, Response = ServiceResponse, Error = Error, Config = (), InitError = ()>
Converts the server into an actix-web
compatible NewService
sourcepub fn into_web_service(
self: Arc<Self>
) -> impl ServiceFactory<ServiceRequest, Response = ServiceResponse, Error = Error, Config = (), InitError = ()>
pub fn into_web_service( self: Arc<Self> ) -> impl ServiceFactory<ServiceRequest, Response = ServiceResponse, Error = Error, Config = (), InitError = ()>
Is an alias to into_actix_web_service
or into_hyper_web_service
depending on which feature is enabled
Is not provided when both features are enabled
Auto Trait Implementations§
impl<R> !RefUnwindSafe for Server<R>
impl<R> Send for Server<R>where R: Send,
impl<R> Sync for Server<R>where R: Sync,
impl<R> Unpin for Server<R>where R: Unpin,
impl<R> !UnwindSafe for Server<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