pub struct Server<S> { /* private fields */ }
Expand description
The main server type that processes incoming requests
Implementations§
Source§impl<S> Server<S>where
S: Service<JsonRpcRequest, Response = JsonRpcResponse> + Send,
S::Error: Into<BoxError>,
S::Future: Send,
impl<S> Server<S>where
S: Service<JsonRpcRequest, Response = JsonRpcResponse> + Send,
S::Error: Into<BoxError>,
S::Future: Send,
pub fn new(service: S) -> Self
pub async fn run<R, W>( self, transport: ByteTransport<R, W>, ) -> Result<(), ServerError>
Auto Trait Implementations§
impl<S> Freeze for Server<S>where
S: Freeze,
impl<S> RefUnwindSafe for Server<S>where
S: RefUnwindSafe,
impl<S> Send for Server<S>where
S: Send,
impl<S> Sync for Server<S>where
S: Sync,
impl<S> Unpin for Server<S>where
S: Unpin,
impl<S> UnwindSafe for Server<S>where
S: UnwindSafe,
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