pub struct RustAnalyzerMCPServer { /* private fields */ }Implementations§
Source§impl RustAnalyzerMCPServer
impl RustAnalyzerMCPServer
pub fn new() -> Self
pub fn with_workspace(workspace_root: PathBuf) -> Self
Sourcepub async fn run(&mut self) -> Result<()>
pub async fn run(&mut self) -> Result<()>
Runs the server until its stdin reaches EOF or a shutdown signal arrives.
Installs process-wide signal handlers that remain in effect after this returns. Reads
stdin through tokio::io::stdin, whose parked blocking read cannot be cancelled: after
a signal-triggered exit the caller must not wait for the runtime to shut down on its own.
See this crate’s main.rs, which uses tokio::runtime::Runtime::shutdown_background.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RustAnalyzerMCPServer
impl !UnwindSafe for RustAnalyzerMCPServer
impl Freeze for RustAnalyzerMCPServer
impl Send for RustAnalyzerMCPServer
impl Sync for RustAnalyzerMCPServer
impl Unpin for RustAnalyzerMCPServer
impl UnsafeUnpin for RustAnalyzerMCPServer
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
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