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§