sway_lsp::capabilities::runnable

Trait Runnable

Source
pub trait Runnable:
    Debug
    + Send
    + Sync
    + 'static {
    // Required methods
    fn cmd_string(&self) -> String;
    fn label_string(&self) -> String;
    fn arguments(&self) -> Option<Vec<Value>>;
    fn range(&self) -> &Range;

    // Provided method
    fn command(&self) -> Command { ... }
}
Expand description

A runnable is a sway function that can be executed in the editor.

Required Methods§

Source

fn cmd_string(&self) -> String

The command name defined in the client.

Source

fn label_string(&self) -> String

The label to display in the editor.

Source

fn arguments(&self) -> Option<Vec<Value>>

The arguments to pass to the command.

Source

fn range(&self) -> &Range

The range in the file where the runnable button should be displayed.

Provided Methods§

Source

fn command(&self) -> Command

The command to execute.

Implementors§