Enum prodash::render::tui::Event[][src]

pub enum Event {
    Tick,
    Input(Key),
    SetWindowSize(Rect),
    SetTitle(String),
    SetInformation(Vec<Line>),
    SetInterruptMode(Interrupt),
}
Expand description

An event to be sent in the tui::render_with_input(…events) stream.

This way, the TUI can be instructed to draw frames or change the information to be displayed.

Variants

Tick

Draw a frame

Input(Key)

Tuple Fields

0: Key

Send any key - can be used to simulate user input, and is typically generated by the TUI’s own input loop.

SetWindowSize(Rect)

Tuple Fields

0: Rect

Change the size of the window to the given rectangle.

Useful to embed the TUI into other terminal user interfaces that can resize dynamically.

SetTitle(String)

Tuple Fields

0: String

Set the title of the progress dashboard

SetInformation(Vec<Line>)

Tuple Fields

0: Vec<Line>

Provide a list of titles and lines to populate the side bar on the right.

SetInterruptMode(Interrupt)

Tuple Fields

The way the GUI will respond to interrupt requests. See Interrupt for more information.

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

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