pub struct ServerHandler<M: Metadata = (), S: Middleware<M> = Noop> { /* private fields */ }
Expand description
jsonrpc http request handler.
Implementations§
Source§impl<M: Metadata, S: Middleware<M>> ServerHandler<M, S>
impl<M: Metadata, S: Middleware<M>> ServerHandler<M, S>
Sourcepub fn new(
jsonrpc_handler: WeakRpc<M, S>,
cors_domains: Option<Vec<AccessControlAllowOrigin>>,
cors_max_age: Option<u32>,
cors_allowed_headers: AccessControlAllowHeaders,
allowed_hosts: Option<Vec<Host>>,
middleware: Arc<dyn RequestMiddleware>,
rest_api: RestApi,
health_api: Option<(String, String)>,
max_request_body_size: usize,
keep_alive: bool,
) -> Self
pub fn new( jsonrpc_handler: WeakRpc<M, S>, cors_domains: Option<Vec<AccessControlAllowOrigin>>, cors_max_age: Option<u32>, cors_allowed_headers: AccessControlAllowHeaders, allowed_hosts: Option<Vec<Host>>, middleware: Arc<dyn RequestMiddleware>, rest_api: RestApi, health_api: Option<(String, String)>, max_request_body_size: usize, keep_alive: bool, ) -> Self
Create new request handler.
Trait Implementations§
Source§impl<M, S: Middleware<M>> Service<Request<Body>> for ServerHandler<M, S>
impl<M, S: Middleware<M>> Service<Request<Body>> for ServerHandler<M, S>
Auto Trait Implementations§
impl<M, S> Freeze for ServerHandler<M, S>
impl<M = (), S = Noop> !RefUnwindSafe for ServerHandler<M, S>
impl<M, S> Send for ServerHandler<M, S>
impl<M, S> Sync for ServerHandler<M, S>
impl<M, S> Unpin for ServerHandler<M, S>
impl<M = (), S = Noop> !UnwindSafe for ServerHandler<M, S>
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