Struct pager_rs::State[][src]

pub struct State {
    pub pos: (usize, usize),
    pub size: (u16, u16),
    pub content: String,
    pub status_bar: StatusBar,
    pub commands: CommandList,
    pub show_line_numbers: bool,
    // some fields omitted
}

Fields

pos: (usize, usize)

Cursor position in content.

(x, y)

size: (u16, u16)

Size of terminal screen.

(width, height)

content: String

Content to show.

status_bar: StatusBar

status bar at the bottom.

commands: CommandListshow_line_numbers: bool

Implementations

Create new State

Terminate State

Default help text formatter

Get text to be printed on terminal except for the StatusBar.

Move cursor up.

Move cursor down.

Move cursor left.

Move cursor right.

Move cursor one page up.

Move cursor one page down.

Move cursor to the start.

Move cursor to the end.

Find and execute command matching with pressed key.

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