pub struct RustJudge { /* private fields */ }Implementations§
Source§impl RustJudge
impl RustJudge
pub fn new() -> Self
Sourcepub fn with_project(project_root: PathBuf) -> Self
pub fn with_project(project_root: PathBuf) -> Self
Create a RustJudge with a project root for semantic analysis
Sourcepub fn with_workspace(project_path: &Path) -> Result<Self, String>
pub fn with_workspace(project_path: &Path) -> Result<Self, String>
Create a new instance with workspace data loaded from a Cargo project
Sourcepub fn extract_word_prefix(source: &str, position: Position) -> String
pub fn extract_word_prefix(source: &str, position: Position) -> String
Extract the word prefix at the cursor position
Trait Implementations§
Source§impl Judge for RustJudge
impl Judge for RustJudge
Source§fn diagnostics(&self, source: &str) -> Vec<Diagnostic>
fn diagnostics(&self, source: &str) -> Vec<Diagnostic>
Parse the source code and return diagnostics
Source§fn symbols(&self, source: &str) -> Result<Vec<Symbol>, String>
fn symbols(&self, source: &str) -> Result<Vec<Symbol>, String>
Get all symbols in the source code
Source§fn symbol_at_position(
&self,
source: &str,
position: Position,
) -> Result<Option<Symbol>, String>
fn symbol_at_position( &self, source: &str, position: Position, ) -> Result<Option<Symbol>, String>
Find symbol at a specific position
Source§fn completions(
&self,
source: &str,
position: Position,
) -> Result<Vec<CompletionItem>, String>
fn completions( &self, source: &str, position: Position, ) -> Result<Vec<CompletionItem>, String>
Get completion suggestions at a position
Auto Trait Implementations§
impl !Freeze for RustJudge
impl !RefUnwindSafe for RustJudge
impl !Sync for RustJudge
impl Send for RustJudge
impl Unpin for RustJudge
impl UnsafeUnpin for RustJudge
impl UnwindSafe for RustJudge
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<'a, T> Captures<'a> for Twhere
T: ?Sized,
Source§impl<T> Cast for T
impl<T> Cast for T
Source§fn cast<U>(self, interner: <U as HasInterner>::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
fn cast<U>(self, interner: <U as HasInterner>::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
Cast a value to type
U using CastTo.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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