pub struct RustAnalyzer {
pub verbose: u32,
pub quiet: bool,
pub log_file: Option<PathBuf>,
pub no_log_buffering: bool,
pub wait_dbg: bool,
pub subcommand: RustAnalyzerCmd,
}Fields§
§verbose: u32§quiet: bool§log_file: Option<PathBuf>§no_log_buffering: bool§wait_dbg: bool§subcommand: RustAnalyzerCmdImplementations§
Source§impl RustAnalyzer
impl RustAnalyzer
Source§impl RustAnalyzer
impl RustAnalyzer
Source§impl RustAnalyzer
impl RustAnalyzer
const HELP_: &'static str = "rust-analyzer\n LSP server for the Rust programming language.\n\n Subcommands and their flags do not provide any stability guarantees and may be removed or\n changed without notice. Top-level flags that are not marked as [Unstable] provide\n backwards-compatibility and may be relied on.\n\nOPTIONS:\n -v, --verbose\n Verbosity level, can be repeated multiple times.\n\n -q, --quiet\n Verbosity level.\n\n --log-file <path>\n Log to the specified file instead of stderr.\n\n --no-log-buffering\n Flush log records to the file immediately.\n\n --wait-dbg\n [Unstable] Wait until a debugger is attached to (requires debug build).\n\n -h, --help\n Prints help information.\n\n -V, --version\n Print version.\n\n --print-config-schema\n Dump a LSP config JSON schema.\n\nSUBCOMMANDS:\n\nrust-analyzer parse\n Parse stdin.\n\n OPTIONS:\n --no-dump\n Suppress printing.\n\n\nrust-analyzer symbols\n Parse stdin and print the list of symbols.\n\n\nrust-analyzer highlight\n Highlight stdin as html.\n\n OPTIONS:\n --rainbow\n Enable rainbow highlighting of identifiers.\n\n\nrust-analyzer analysis-stats\n Batch typecheck project and print summary statistics\n\n ARGS:\n <path>\n Directory with Cargo.toml or rust-project.json.\n\n OPTIONS:\n --output <format>\n\n --randomize\n Randomize order in which crates, modules, and items are processed.\n\n --parallel\n Run type inference in parallel.\n\n -o, --only <path>\n Only analyze items matching this path.\n\n --with-deps\n Also analyze all dependencies.\n\n --no-sysroot\n Don\'t load sysroot crates (`std`, `core` & friends).\n\n --no-test\n Don\'t set #[cfg(test)].\n\n --disable-build-scripts\n Don\'t run build scripts or load `OUT_DIR` values by running `cargo check` before analysis.\n\n --disable-proc-macros\n Don\'t expand proc macros.\n\n --proc-macro-srv <path>\n Run the proc-macro-srv binary at the specified path.\n\n --skip-lang-items\n Skip lang items fetching.\n\n --skip-lowering\n Skip body lowering.\n\n --skip-inference\n Skip type inference.\n\n --skip-mir-stats\n Skip lowering to mir\n\n --skip-data-layout\n Skip data layout calculation\n\n --skip-const-eval\n Skip const evaluation\n\n --run-all-ide-things\n Runs several IDE features after analysis, including semantics highlighting, diagnostics\n and annotations. This is useful for benchmarking the memory usage on a project that has\n been worked on for a bit in a longer running session.\n\n --run-term-search\n Run term search on all the tail expressions (of functions, block, if statements etc.)\n\n --validate-term-search\n Validate term search by running `cargo check` on every response.\n Note that this also temporarily modifies the files on disk, use with caution!\n\n\nrust-analyzer run-tests\n Run unit tests of the project using mir interpreter\n\n ARGS:\n <path>\n Directory with Cargo.toml or rust-project.json.\n\n\nrust-analyzer rustc-tests\n Run unit tests of the project using mir interpreter\n\n ARGS:\n <rustc_repo>\n Directory with Cargo.toml.\n\n OPTIONS:\n --filter <path>\n Only run tests with filter as substring\n\n\nrust-analyzer diagnostics\n\n ARGS:\n <path>\n Directory with Cargo.toml or rust-project.json.\n\n OPTIONS:\n --disable-build-scripts\n Don\'t run build scripts or load `OUT_DIR` values by running `cargo check` before analysis.\n\n --disable-proc-macros\n Don\'t expand proc macros.\n\n --proc-macro-srv <path>\n Run the proc-macro-srv binary at the specified path.\n\n --severity <severity>\n The minimum severity.\n\n\nrust-analyzer unresolved-references\n Report unresolved references\n\n ARGS:\n <path>\n Directory with Cargo.toml or rust-project.json.\n\n OPTIONS:\n --disable-build-scripts\n Don\'t run build scripts or load `OUT_DIR` values by running `cargo check` before analysis.\n\n --disable-proc-macros\n Don\'t expand proc macros.\n\n --proc-macro-srv <path>\n Run the proc-macro-srv binary at the specified path.\n\n\nrust-analyzer prime-caches\n Prime caches, as rust-analyzer does typically at startup in interactive sessions.\n\n ARGS:\n <path>\n Directory with Cargo.toml or rust-project.json.\n\n OPTIONS:\n --disable-build-scripts\n Don\'t run build scripts or load `OUT_DIR` values by running `cargo check` before analysis.\n\n --disable-proc-macros\n Don\'t expand proc macros.\n\n --proc-macro-srv <path>\n Run the proc-macro-srv binary at the specified path.\n\n --num-threads <num_threads>\n The number of threads to use. Defaults to the number of physical cores.\n\n\nrust-analyzer ssr\n\n ARGS:\n <rule>...\n A structured search replace rule (`$a.foo($b) ==>> bar($a, $b)`)\n\n\nrust-analyzer search\n\n ARGS:\n <pattern>...\n A structured search replace pattern (`$a.foo($b)`)\n\n OPTIONS:\n --debug <snippet>\n Prints debug information for any nodes with source exactly equal to snippet.\n\n\nrust-analyzer lsif\n\n ARGS:\n <path>\n\n OPTIONS:\n --exclude-vendored-libraries\n Exclude code from vendored libraries from the resulting index.\n\n\nrust-analyzer scip\n\n ARGS:\n <path>\n\n OPTIONS:\n --output <path>\n The output path where the SCIP file will be written to. Defaults to `index.scip`.\n\n --config-path <config_path>\n A path to an json configuration file that can be used to customize cargo behavior.\n\n --exclude-vendored-libraries\n Exclude code from vendored libraries from the resulting index.\n"
Source§impl RustAnalyzer
impl RustAnalyzer
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
§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§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