pub struct StdioClient<Request, Response>where
Request: RequestJsonRpcConvert<Request> + Send + 'static,
Response: ResponseJsonRpcConvert<Request, Response> + Send + 'static,{ /* private fields */ }
Expand description
Client for stdio communication via a child process. If cloned, this client will continue to communicate with the same child process.
Implementations§
Source§impl<Request, Response> StdioClient<Request, Response>where
Request: RequestJsonRpcConvert<Request> + Send + 'static,
Response: ResponseJsonRpcConvert<Request, Response> + Send + 'static,
impl<Request, Response> StdioClient<Request, Response>where
Request: RequestJsonRpcConvert<Request> + Send + 'static,
Response: ResponseJsonRpcConvert<Request, Response> + Send + 'static,
Sourcepub async fn new(
program: &str,
args: &[&str],
config: StdioClientConfig,
) -> Result<StdioClient<Request, Response>, Error>
pub async fn new( program: &str, args: &[&str], config: StdioClientConfig, ) -> Result<StdioClient<Request, Response>, Error>
Creates a new client for stdio communication. A new child process will be
spawned, and a std::io::Error
will be returned if spawning fails.
Trait Implementations§
Source§impl<Request, Response> Clone for StdioClient<Request, Response>where
Request: Clone + RequestJsonRpcConvert<Request> + Send + 'static,
Response: Clone + ResponseJsonRpcConvert<Request, Response> + Send + 'static,
impl<Request, Response> Clone for StdioClient<Request, Response>where
Request: Clone + RequestJsonRpcConvert<Request> + Send + 'static,
Response: Clone + ResponseJsonRpcConvert<Request, Response> + Send + 'static,
Source§fn clone(&self) -> StdioClient<Request, Response>
fn clone(&self) -> StdioClient<Request, Response>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<Request, Response> Service<Request> for StdioClient<Request, Response>where
Request: RequestJsonRpcConvert<Request> + Send + 'static,
Response: ResponseJsonRpcConvert<Request, Response> + Send + 'static,
impl<Request, Response> Service<Request> for StdioClient<Request, Response>where
Request: RequestJsonRpcConvert<Request> + Send + 'static,
Response: ResponseJsonRpcConvert<Request, Response> + Send + 'static,
Source§type Response = ServiceResponse<Response>
type Response = ServiceResponse<Response>
Responses given by the service.
Source§type Future = Pin<Box<dyn Future<Output = Result<ServiceResponse<Response>, Box<dyn Error + Sync + Send>>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<ServiceResponse<Response>, Box<dyn Error + Sync + Send>>> + Send>>
The future response value.
Auto Trait Implementations§
impl<Request, Response> Freeze for StdioClient<Request, Response>
impl<Request, Response> !RefUnwindSafe for StdioClient<Request, Response>
impl<Request, Response> Send for StdioClient<Request, Response>
impl<Request, Response> Sync for StdioClient<Request, Response>
impl<Request, Response> Unpin for StdioClient<Request, Response>
impl<Request, Response> !UnwindSafe for StdioClient<Request, Response>
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