Struct fm::tab::Tab

source ·
pub struct Tab {
Show 13 fields pub mode: Mode, pub window: ContentWindow, pub input: Input, pub path_content: PathContent, pub height: usize, pub show_hidden: bool, pub nvim_server: String, pub completion: Completion, pub must_quit: bool, pub preview: Preview, pub history: History, pub shortcut: Shortcut, pub searched: Option<String>,
}
Expand description

Holds every thing about the current tab of the application. Most of the mutation is done externally.

Fields§

§mode: Mode

The mode the application is currenty in

§window: ContentWindow

The indexes of displayed file

§input: Input

Files marked as flagged

§path_content: PathContent

Files in current path

§height: usize

Height of the terminal window

§show_hidden: bool

read from command line

§nvim_server: String

NVIM RPC server address

§completion: Completion

Completion list and index in it.

§must_quit: bool

True if the user issued a quit event (Key::Char('q') by default). It’s used to exit the main loop before reseting the cursor.

§preview: Preview

Lines of the previewed files. Empty if not in preview mode.

§history: History

Visited directories

§shortcut: Shortcut

Predefined shortcuts

§searched: Option<String>

Last searched string

Implementations§

Creates a new tab from args and height.

Fill the input string with the currently selected completion.

Refresh the current view. Input string is emptied, the files are read again, the window of displayed files is reset. The first file is selected.

Move to the currently selected directory. Fail silently if the current directory is empty or if the selected file isn’t a directory.

Set the height of the window and itself.

Returns true iff the application has to quit. This methods allows use to reset the cursors and other terminal parameters gracefully.

Returns a string of the current directory path.

Set the pathcontent to a new path. Reset the window. Add the last path to the history of visited paths.

Set the window. Doesn’t require the lenght to be known.

Set the line index to index and scroll there.

Returns the correct index jump target to a flagged files.

Refresh the shortcuts. It drops non “hardcoded” shortcuts and extend the vector with the mount points.

Refresh the existing users.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. 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

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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
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.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more