Skip to main content

Commands

Enum Commands 

Source
pub enum Commands {
    Daemon {
        workspace: PathBuf,
    },
    Status,
    Refresh,
    Symbol {
        name: String,
        kind: String,
        exact: bool,
        body: bool,
        max_lines: usize,
    },
    Outline {
        file: Option<PathBuf>,
        file_list: Option<String>,
        output: Option<PathBuf>,
        body: bool,
        max_lines: usize,
    },
    Definition {
        file: PathBuf,
        line: u32,
        col: u32,
        body: bool,
        max_lines: usize,
        no_line_numbers: bool,
    },
    Body {
        file: PathBuf,
        line: u32,
        col: u32,
        max_lines: usize,
        no_line_numbers: bool,
    },
    Hover {
        file: PathBuf,
        line: u32,
        col: u32,
    },
    References {
        file: PathBuf,
        line: u32,
        col: u32,
    },
    Calls {
        file: PathBuf,
        line: u32,
        col: u32,
        direction: CallDirection,
        depth: u32,
    },
    Relations {
        file: PathBuf,
        line: u32,
        col: u32,
        mode: RelationMode,
    },
    InitSkill {
        workspace: PathBuf,
        dir: Option<PathBuf>,
    },
}

Variants§

§

Daemon

Start the background LSP daemon and HTTP server

Fields

§workspace: PathBuf

Workspace root directory (default: current directory)

§

Status

Query daemon and rust-analyzer status

§

Refresh

Refresh / restart the rust-analyzer session

§

Symbol

Search workspace symbols

Fields

§name: String

Symbol name to search for

§kind: String

Optional Rust symbol filter; use any for all canonical Rust symbol kinds

§exact: bool

Match exact symbol name

§body: bool

Include source code body/snippet; output is limited by –max-lines

§max_lines: usize

Maximum body lines (default: 100; 0 means unlimited)

§

Outline

Extract file document symbols outline

Fields

§file: Option<PathBuf>

Target file path; mutually exclusive with –file-list

§file_list: Option<String>

Comma-separated target file paths; mutually exclusive with –file

§output: Option<PathBuf>

Write outline output to a file instead of stdout

§body: bool

Include source code body/snippet for symbols; output is limited by –max-lines

§max_lines: usize

Maximum body lines (default: 100; 0 means unlimited)

§

Definition

Go to definition at file line and column

Fields

§file: PathBuf

File path

§line: u32

Line number (1-based and must be greater than zero)

§col: u32

Column number (1-based and must be greater than zero)

§body: bool

Include source code body/snippet of the definition target

§max_lines: usize

Maximum body lines (default: 100; 0 means unlimited)

§no_line_numbers: bool

Omit line numbers in terminal output

§

Body

Inspect source code body of struct, function, enum, impl, trait, or module

Fields

§file: PathBuf

File path

§line: u32

Line number (1-based and must be greater than zero)

§col: u32

Column number (1-based and must be greater than zero)

§max_lines: usize

Maximum body lines (default: 100; 0 means unlimited)

§no_line_numbers: bool

Omit line numbers in terminal output

§

Hover

Show documentation and type information at a file position

Fields

§file: PathBuf

File path

§line: u32

Line number (1-based and must be greater than zero)

§col: u32

Column number (1-based and must be greater than zero)

§

References

Find references at a file position

Fields

§file: PathBuf

File path

§line: u32

Line number (1-based and must be greater than zero)

§col: u32

Column number (1-based and must be greater than zero)

§

Calls

Find incoming or outgoing calls at a file position

Fields

§file: PathBuf

File path

§line: u32

Line number (1-based and must be greater than zero)

§col: u32

Column number (1-based and must be greater than zero)

§direction: CallDirection

Call direction: incoming or outgoing (default: incoming)

§depth: u32

Call hierarchy traversal depth (default: 1; must be greater than zero)

§

Relations

Query Rust symbol relations

Fields

§file: PathBuf

File path

§line: u32

Line number (1-based and must be greater than zero)

§col: u32

Column number (1-based and must be greater than zero)

§mode: RelationMode

Relation mode (currently only implementations)

§

InitSkill

Initialize/install the rust-codebase-navigation SKILL.md in a workspace

Fields

§workspace: PathBuf

Target workspace directory (default: current directory)

§dir: Option<PathBuf>

Custom project-relative skill path (default: .agents/skills/rust-codebase-navigation/SKILL.md)

Trait Implementations§

Source§

impl Debug for Commands

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for Commands

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Commands

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more