Struct jsonrpc_http_server::ServerHandler
source · [−]pub struct ServerHandler<M: Metadata = (), S: Middleware<M> = Noop> { /* private fields */ }
Expand description
jsonrpc http request handler.
Implementations
sourceimpl<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
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more