pub struct StdioServer<Request, Response, S>where
Request: RequestJsonRpcConvert<Request> + Send,
Response: ResponseJsonRpcConvert<Request, Response> + Send,
S: Service<Request, Response = ServiceResponse<Response>, Error = Box<dyn Error + Sync + Send>, Future = Pin<Box<dyn Future<Output = Result<ServiceResponse<Response>, Box<dyn Error + Sync + Send>>> + Send>>> + Send + 'static,{ /* private fields */ }Expand description
Server for stdio communication via a parent process.
Implementations§
Source§impl<Request, Response, S> StdioServer<Request, Response, S>where
Request: RequestJsonRpcConvert<Request> + Send + 'static,
Response: ResponseJsonRpcConvert<Request, Response> + Send + 'static,
S: Service<Request, Response = ServiceResponse<Response>, Error = Box<dyn Error + Sync + Send>, Future = Pin<Box<dyn Future<Output = Result<ServiceResponse<Response>, Box<dyn Error + Sync + Send>>> + Send>>> + Send + 'static,
impl<Request, Response, S> StdioServer<Request, Response, S>where
Request: RequestJsonRpcConvert<Request> + Send + 'static,
Response: ResponseJsonRpcConvert<Request, Response> + Send + 'static,
S: Service<Request, Response = ServiceResponse<Response>, Error = Box<dyn Error + Sync + Send>, Future = Pin<Box<dyn Future<Output = Result<ServiceResponse<Response>, Box<dyn Error + Sync + Send>>> + Send>>> + Send + 'static,
Sourcepub fn new(
service: S,
config: StdioServerConfig,
) -> StdioServer<Request, Response, S>
pub fn new( service: S, config: StdioServerConfig, ) -> StdioServer<Request, Response, S>
Creates a new server for stdio communication. Client requests will be
converted and forwarded to the service.
Auto Trait Implementations§
impl<Request, Response, S> !RefUnwindSafe for StdioServer<Request, Response, S>
impl<Request, Response, S> !UnwindSafe for StdioServer<Request, Response, S>
impl<Request, Response, S> Freeze for StdioServer<Request, Response, S>where
Timeout<S>: Freeze,
Option<UnboundedSender<ServerNotificationLink<Response>>>: Freeze,
PhantomData<Request>: Freeze,
impl<Request, Response, S> Send for StdioServer<Request, Response, S>where
Timeout<S>: Send,
Option<UnboundedSender<ServerNotificationLink<Response>>>: Send,
PhantomData<Request>: Send,
impl<Request, Response, S> Sync for StdioServer<Request, Response, S>where
Timeout<S>: Sync,
Option<UnboundedSender<ServerNotificationLink<Response>>>: Sync,
PhantomData<Request>: Sync,
impl<Request, Response, S> Unpin for StdioServer<Request, Response, S>where
Timeout<S>: Unpin,
Option<UnboundedSender<ServerNotificationLink<Response>>>: Unpin,
PhantomData<Request>: Unpin,
impl<Request, Response, S> UnsafeUnpin for StdioServer<Request, Response, S>where
Timeout<S>: UnsafeUnpin,
Option<UnboundedSender<ServerNotificationLink<Response>>>: UnsafeUnpin,
PhantomData<Request>: UnsafeUnpin,
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