Struct jsonrpc_v2::Server
source · [−]pub struct Server<R> { /* private fields */ }Expand description
Server/request handler
Implementations
sourceimpl<R: Router> Server<R>
impl<R: Router> Server<R>
pub fn with_router(router: R) -> ServerBuilder<R>
sourceimpl<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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more