pub struct Client { /* private fields */ }Expand description
A handle for sending server-to-client messages, such as textDocument/publishDiagnostics.
Cheap to clone; clones can be moved to other threads.
Implementations§
Source§impl Client
impl Client
Sourcepub fn notify<N>(&self, params: N::Params) -> Result<(), SendError<Message>>where
N: Notification,
pub fn notify<N>(&self, params: N::Params) -> Result<(), SendError<Message>>where
N: Notification,
Sends the notification N to the client. Fails only once the connection has closed.
Sourcepub fn request<R>(&self, params: R::Params) -> Result<(), SendError<Message>>where
R: Request,
pub fn request<R>(&self, params: R::Params) -> Result<(), SendError<Message>>where
R: Request,
Sends the request R to the client, such as client/registerCapability, without waiting for its reply. The
client’s reply reaches the Handler, which ignores it. Fails only once the connection has
closed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
impl UnwindSafe for Client
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