pub struct RAClient {
handle: Child,
sender: Option<SyncSender<Message>>,
receiver: Option<Receiver<Message>>,
}
Expand description
An LSP client for Rust Analyzer (RA) that launches it as a subprocess.
Fields§
§handle: Child
Handle to the client
sender: Option<SyncSender<Message>>
§receiver: Option<Receiver<Message>>
Implementations§
Source§impl RAClient
impl RAClient
pub fn start(&mut self, folders: &[PathBuf])
Sourcepub fn request(&mut self, message: Request) -> Option<Response>
pub fn request(&mut self, message: Request) -> Option<Response>
Send an LSP request to the server. This returns an option
in the case of an error such as the server being shut down
from pressing Ctrl+C
.
pub fn notify(&mut self, message: Notification)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RAClient
impl RefUnwindSafe for RAClient
impl Send for RAClient
impl !Sync for RAClient
impl Unpin for RAClient
impl UnwindSafe for RAClient
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more