pub struct RustAnalyzer { /* private fields */ }Expand description
Rust source code analyzer using syn for parsing
Implementations§
Source§impl RustAnalyzer
impl RustAnalyzer
pub fn new() -> Self
pub fn with_private(self, include: bool) -> Self
Sourcepub fn analyze_file(&self, path: &Path) -> Result<Vec<AnalyzedItem>>
pub fn analyze_file(&self, path: &Path) -> Result<Vec<AnalyzedItem>>
Analyze a Rust source file
Sourcepub fn analyze_file_with_module(
&self,
path: &Path,
module_path: Vec<String>,
) -> Result<Vec<AnalyzedItem>>
pub fn analyze_file_with_module( &self, path: &Path, module_path: Vec<String>, ) -> Result<Vec<AnalyzedItem>>
Analyze a Rust source file with a base module path prefix
Sourcepub fn analyze_source(&self, source: &str) -> Result<Vec<AnalyzedItem>>
pub fn analyze_source(&self, source: &str) -> Result<Vec<AnalyzedItem>>
Analyze Rust source code from a string
Sourcepub fn analyze_source_with_path(
&self,
source: &str,
path: Option<PathBuf>,
) -> Result<Vec<AnalyzedItem>>
pub fn analyze_source_with_path( &self, source: &str, path: Option<PathBuf>, ) -> Result<Vec<AnalyzedItem>>
Analyze Rust source code with optional file path
Sourcepub fn analyze_source_with_module(
&self,
source: &str,
path: Option<PathBuf>,
module_path: Vec<String>,
) -> Result<Vec<AnalyzedItem>>
pub fn analyze_source_with_module( &self, source: &str, path: Option<PathBuf>, module_path: Vec<String>, ) -> Result<Vec<AnalyzedItem>>
Analyze Rust source code with explicit module path
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RustAnalyzer
impl RefUnwindSafe for RustAnalyzer
impl Send for RustAnalyzer
impl Sync for RustAnalyzer
impl Unpin for RustAnalyzer
impl UnwindSafe for RustAnalyzer
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> 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