Struct jsonrpsee_server::Server
source · pub struct Server<B = Identity, L = ()> { /* private fields */ }Expand description
JSON RPC server.
Implementations§
source§impl<B, L> Server<B, L>
impl<B, L> Server<B, L>
sourcepub fn local_addr(&self) -> Result<SocketAddr, Error>
pub fn local_addr(&self) -> Result<SocketAddr, Error>
Returns socket address to which the server is bound.
source§impl<S, B, L> Server<S, L>where
L: Logger,
S: Layer<TowerService<L>> + Send + 'static,
<S as Layer<TowerService<L>>>::Service: Send + Service<Request<Body>, Response = Response<B>, Error = Box<dyn StdError + Send + Sync + 'static>>,
<<S as Layer<TowerService<L>>>::Service as Service<Request<Body>>>::Future: Send,
B: HttpBody + Send + 'static,
<B as HttpBody>::Error: Send + Sync + StdError,
<B as HttpBody>::Data: Send,
impl<S, B, L> Server<S, L>where L: Logger, S: Layer<TowerService<L>> + Send + 'static, <S as Layer<TowerService<L>>>::Service: Send + Service<Request<Body>, Response = Response<B>, Error = Box<dyn StdError + Send + Sync + 'static>>, <<S as Layer<TowerService<L>>>::Service as Service<Request<Body>>>::Future: Send, B: HttpBody + Send + 'static, <B as HttpBody>::Error: Send + Sync + StdError, <B as HttpBody>::Data: Send,
sourcepub fn start(self, methods: impl Into<Methods>) -> ServerHandle
pub fn start(self, methods: impl Into<Methods>) -> ServerHandle
Start responding to connections requests.
This will run on the tokio runtime until the server is stopped or the ServerHandle is dropped.
Trait Implementations§
Auto Trait Implementations§
impl<B = Identity, L = ()> !RefUnwindSafe for Server<B, L>
impl<B, L> Send for Server<B, L>where B: Send, L: Send,
impl<B, L> Sync for Server<B, L>where B: Sync, L: Sync,
impl<B, L> Unpin for Server<B, L>where B: Unpin, L: Unpin,
impl<B = Identity, L = ()> !UnwindSafe for Server<B, L>
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