pub struct ClientConnection(/* private fields */);Expand description
A connection to a separate client process over the ACP protocol.
Implementations§
Source§impl ClientConnection
impl ClientConnection
pub fn connect_to_client<H: 'static + Agent>( handler: H, outgoing_bytes: impl Unpin + AsyncWrite, incoming_bytes: impl Unpin + AsyncRead, spawn: impl Fn(LocalBoxFuture<'static, ()>) + 'static, ) -> (Self, impl Future<Output = Result<(), Error>>)
pub fn request<R: ClientRequest>( &self, params: R, ) -> impl use<R> + Future<Output = Result<R::Response, Error>>
Sourcepub fn request_any(
&self,
method: &'static str,
params: AnyClientRequest,
) -> impl Future<Output = Result<AnyClientResult, Error>>
pub fn request_any( &self, method: &'static str, params: AnyClientRequest, ) -> impl Future<Output = Result<AnyClientResult, Error>>
Send an untyped request to the client and wait for a response.
Auto Trait Implementations§
impl !Freeze for ClientConnection
impl !RefUnwindSafe for ClientConnection
impl !UnwindSafe for ClientConnection
impl Send for ClientConnection
impl Sync for ClientConnection
impl Unpin for ClientConnection
impl UnsafeUnpin for ClientConnection
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