pub struct TypedLspClient<S> { /* private fields */ }Expand description
A Lsp client with typed service S.
Implementations§
Source§impl<S: 'static> TypedLspClient<S>
impl<S: 'static> TypedLspClient<S>
Sourcepub fn send_dap_event<E: IEvent>(&self, body: E::Body)
pub fn send_dap_event<E: IEvent>(&self, body: E::Body)
Sends a dap event to the client.
Sourcepub fn send_dap_event_(&self, evt: Event)
pub fn send_dap_event_(&self, evt: Event)
Sends an untyped dap_event to the client.
Source§impl<S: 'static> TypedLspClient<S>
impl<S: 'static> TypedLspClient<S>
Source§impl<S> TypedLspClient<S>
impl<S> TypedLspClient<S>
Sourcepub fn to_untyped(self) -> LspClient
pub fn to_untyped(self) -> LspClient
Converts the client to an untyped client.
Source§impl<S: 'static> TypedLspClient<S>
impl<S: 'static> TypedLspClient<S>
Methods from Deref<Target = LspClient>§
Sourcepub fn send_lsp_request_<R: Req>(
&self,
params: R::Params,
handler: impl FnOnce(&mut dyn Any, Response) + Send + Sync + 'static,
)
pub fn send_lsp_request_<R: Req>( &self, params: R::Params, handler: impl FnOnce(&mut dyn Any, Response) + Send + Sync + 'static, )
Sends a request to the client and registers a handler.
Sourcepub fn respond_lsp(&self, response: Response)
pub fn respond_lsp(&self, response: Response)
Completes an client2server request in the request queue.
Sourcepub fn send_notification<N: Notif>(&self, params: &N::Params)
pub fn send_notification<N: Notif>(&self, params: &N::Params)
Sends a typed notification to the client.
Sourcepub fn send_notification_(&self, notif: Notification)
pub fn send_notification_(&self, notif: Notification)
Sends an untyped notification to the client.
Sourcepub fn to_typed<S: Any>(&self) -> TypedLspClient<S>
pub fn to_typed<S: Any>(&self) -> TypedLspClient<S>
converts the client to a typed client.
Sourcepub fn has_pending_requests(&self) -> bool
pub fn has_pending_requests(&self) -> bool
Checks if there are pending requests.
Sourcepub fn begin_panic(&self)
pub fn begin_panic(&self)
Prints states of the request queue and panics.
Sourcepub fn send_event<T: Any + Send + 'static>(&self, event: T)
pub fn send_event<T: Any + Send + 'static>(&self, event: T)
Sends a event to the server itself.
Sourcepub fn complete_lsp_request<S: Any>(&self, service: &mut S, response: Response)
pub fn complete_lsp_request<S: Any>(&self, service: &mut S, response: Response)
Completes an server2client request in the request queue.
Sourcepub fn complete_dap_request<S: Any>(&self, service: &mut S, response: Response)
pub fn complete_dap_request<S: Any>(&self, service: &mut S, response: Response)
Completes an server2client request in the request queue.
Sourcepub fn register_request(
&self,
method: &str,
id: &RequestId,
received_at: Instant,
)
pub fn register_request( &self, method: &str, id: &RequestId, received_at: Instant, )
Registers an client2server request in the request queue.
Trait Implementations§
Source§impl<S> Clone for TypedLspClient<S>
impl<S> Clone for TypedLspClient<S>
Auto Trait Implementations§
impl<S> Freeze for TypedLspClient<S>
impl<S> !RefUnwindSafe for TypedLspClient<S>
impl<S> Send for TypedLspClient<S>
impl<S> Sync for TypedLspClient<S>
impl<S> Unpin for TypedLspClient<S>
impl<S> !UnwindSafe for TypedLspClient<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