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 + Send + Sync>, Future = Pin<Box<dyn Future<Output = Result<ServiceResponse<Response>, Box<dyn Error + Send + Sync>>> + 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 + Send + Sync>, Future = Pin<Box<dyn Future<Output = Result<ServiceResponse<Response>, Box<dyn Error + Send + Sync>>> + 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 + Send + Sync>, Future = Pin<Box<dyn Future<Output = Result<ServiceResponse<Response>, Box<dyn Error + Send + Sync>>> + 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> Freeze for StdioServer<Request, Response, S>where
S: Freeze,
impl<Request, Response, S> !RefUnwindSafe for StdioServer<Request, Response, S>
impl<Request, Response, S> Send for StdioServer<Request, Response, S>
impl<Request, Response, S> Sync for StdioServer<Request, Response, S>
impl<Request, Response, S> Unpin for StdioServer<Request, Response, S>
impl<Request, Response, S> !UnwindSafe for StdioServer<Request, Response, S>
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