pub struct RpcServer<H: RpcHandler + ?Sized> { /* private fields */ }Expand description
The JSON-RPC server.
Implementations§
Source§impl<H: RpcHandler + ?Sized> RpcServer<H>
impl<H: RpcHandler + ?Sized> RpcServer<H>
Sourcepub fn new(handler: Arc<H>, mode: RpcServerMode) -> Self
pub fn new(handler: Arc<H>, mode: RpcServerMode) -> Self
Construct a server over handler in mode, with default rate limits.
Sourcepub fn with_rate_limit(self, state: RateLimitState) -> Self
pub fn with_rate_limit(self, state: RateLimitState) -> Self
Replace the rate-limit state (e.g. per-deployment budgets).
Sourcepub fn bind_addr(&self) -> SocketAddr
pub fn bind_addr(&self) -> SocketAddr
The bind address.
Auto Trait Implementations§
impl<H> !RefUnwindSafe for RpcServer<H>
impl<H> !UnwindSafe for RpcServer<H>
impl<H> Freeze for RpcServer<H>where
H: ?Sized,
impl<H> Send for RpcServer<H>where
H: ?Sized,
impl<H> Sync for RpcServer<H>where
H: ?Sized,
impl<H> Unpin for RpcServer<H>where
H: ?Sized,
impl<H> UnsafeUnpin for RpcServer<H>where
H: ?Sized,
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