pub enum Command {
    None,
    VerbEdit(VerbInvocation),
    VerbInvocate(VerbInvocation),
    Internal {
        internal: Internal,
        input_invocation: Option<VerbInvocation>,
    },
    VerbTrigger {
        index: usize,
        input_invocation: Option<VerbInvocation>,
    },
    PatternEdit {
        raw: String,
        expr: BeTree<PatternOperator, PatternParts>,
    },
    Click(u16u16),
    DoubleClick(u16u16),
}
Expand description

a command which may result in a change in the application state.

It may come from a shortcut, from the parsed input, from an argument given on launch.

Variants

None

no command

VerbEdit(VerbInvocation)

a verb invocation, unfinished (user didn’t hit enter)

VerbInvocate(VerbInvocation)

verb invocation, finished (coming from –cmd, or after the user hit enter)

Internal

Fields

internal: Internal
input_invocation: Option<VerbInvocation>

call of an internal done without the input (using a trigger key for example)

VerbTrigger

Fields

index: usize
input_invocation: Option<VerbInvocation>

call of a verb done without the input (using a trigger key for example)

PatternEdit

a pattern being edited

Click(u16u16)

a mouse click

DoubleClick(u16u16)

a mouse double-click Always come after a simple click at same position

Implementations

build a command from the parsed string representation

The command being finished is the difference between a command being edited and a command launched (which happens on enter in the input).

tells whether this action is a verb being invocated on enter in the input field

create a command from a raw input.

finished makes the command an executed form, it’s equivalent to using the Enter key in the Gui.

build a non executed command from a pattern

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.