pub struct FileSelector {
pub project_root: PathBuf,
pub filter: InputField,
pub search_generation: u64,
pub pending_load: Option<PathBuf>,
/* private fields */
}Fields§
§project_root: PathBuf§filter: InputField§search_generation: u64Monotonically increasing generation counter. Incremented on every
FilterEdit; checked against incoming SetResults to discard stale
results from superseded queries.
pending_load: Option<PathBuf>Set when the tree requested a lazy directory load. app.rs drains
this after dispatching the operation and spawns the async read task.
Implementations§
Trait Implementations§
Source§impl Debug for FileSelector
impl Debug for FileSelector
Source§impl View for FileSelector
impl View for FileSelector
Source§fn handle_key(&self, key: KeyEvent) -> Vec<Operation>
fn handle_key(&self, key: KeyEvent) -> Vec<Operation>
Translate key input into operations — no mutation of self.
Source§fn handle_operation(
&mut self,
op: &Operation,
_settings: &Settings,
) -> Option<Event>
fn handle_operation( &mut self, op: &Operation, _settings: &Settings, ) -> Option<Event>
Apply operations this view owns.
Source§fn save_state(&mut self, _app: &mut AppState)
fn save_state(&mut self, _app: &mut AppState)
Save the current state of the view before it is closed.
Source§fn handle_mouse(&self, mouse: MouseEvent) -> Vec<Operation>
fn handle_mouse(&self, mouse: MouseEvent) -> Vec<Operation>
Translate a mouse event into zero or more operations.
Default implementation is a no-op; views that support mouse override this.
Source§fn render(&self, frame: &mut Frame<'_>, area: Rect, theme: &Theme)
fn render(&self, frame: &mut Frame<'_>, area: Rect, theme: &Theme)
Draw the view into the provided
area of the current frame.Source§fn status_bar(&self, _state: &AppState, _bar: &mut StatusBarBuilder)
fn status_bar(&self, _state: &AppState, _bar: &mut StatusBarBuilder)
Populate the global status bar with view-specific content. Read more
Auto Trait Implementations§
impl !Freeze for FileSelector
impl !RefUnwindSafe for FileSelector
impl Send for FileSelector
impl !Sync for FileSelector
impl Unpin for FileSelector
impl UnsafeUnpin for FileSelector
impl UnwindSafe for FileSelector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more