pub struct AnalyzerClient { /* private fields */ }Expand description
Client for communicating with rust-analyzer
This is a lightweight wrapper that can use an existing LSP connection or spawn a new rust-analyzer instance.
Implementations§
Source§impl AnalyzerClient
impl AnalyzerClient
Sourcepub fn new(workspace_root: impl AsRef<Path>) -> Self
pub fn new(workspace_root: impl AsRef<Path>) -> Self
Create a new analyzer client for a workspace
Sourcepub fn workspace_root(&self) -> &Path
pub fn workspace_root(&self) -> &Path
Get the workspace root
Sourcepub fn is_likely_copy(&self, type_name: &str) -> bool
pub fn is_likely_copy(&self, type_name: &str) -> bool
Check if a type is Copy based on known patterns
This is a heuristic check. For accurate results, use InlayHints with actual type information from rust-analyzer.
Auto Trait Implementations§
impl Freeze for AnalyzerClient
impl RefUnwindSafe for AnalyzerClient
impl Send for AnalyzerClient
impl Sync for AnalyzerClient
impl Unpin for AnalyzerClient
impl UnsafeUnpin for AnalyzerClient
impl UnwindSafe for AnalyzerClient
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