[][src]Enum broot::command::Command

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),
}

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

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

Fields of Internal

internal: Internalinput_invocation: Option<VerbInvocation>
VerbTrigger

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

Fields of VerbTrigger

index: usizeinput_invocation: Option<VerbInvocation>
PatternEdit

a pattern being edited

Fields of PatternEdit

raw: Stringexpr: BeTree<PatternOperator, PatternParts>
Click(u16u16)

a mouse click

DoubleClick(u16u16)

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

Implementations

impl Command[src]

pub fn empty() -> Command[src]

pub fn from_parts(cp: CommandParts, finished: bool) -> Self[src]

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).

pub fn is_verb_invocated_from_input(&self) -> bool[src]

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

pub fn from_raw(raw: String, finished: bool) -> Self[src]

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.

pub fn from_pattern(pattern: &InputPattern) -> Self[src]

build a non executed command from a pattern

Trait Implementations

impl Clone for Command[src]

impl Debug for Command[src]

impl Default for Command[src]

Auto Trait Implementations

impl RefUnwindSafe for Command

impl Send for Command

impl Sync for Command

impl Unpin for Command

impl UnwindSafe for Command

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.