pub struct BrowserState {
    pub tree: Tree,
    pub filtered_tree: Option<Tree>,
    /* private fields */
}
Expand description

An application state dedicated to displaying a tree. It’s the first and main screen of broot.

Fields

tree: Treefiltered_tree: Option<Tree>

Implementations

build a new tree state if there’s no error and there’s no cancellation.

return a reference to the currently displayed tree, which is the filtered tree if there’s one, the base tree if not.

return a mutable reference to the currently displayed tree, which is the filtered tree if there’s one, the base tree if not.

Trait Implementations

build a cmdResult asking for the addition of a new state being a browser state similar to the current one but with different options

do some work, totally or partially, if there’s some to do. Stop as soon as the dam asks for interruption

must return None if the state doesn’t display a file tree
called on start of on_command
execute the internal with the optional given invocation. Read more
return the status which should be used when there’s no verb edited
return the flags to display
a generic implementation of on_internal which may be called by states when they don’t have a specific behavior to execute Read more
change the state, does no rendering
return a cmdresult asking for the opening of a preview

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.

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