pub struct FilePickerState {
pub current_dir: PathBuf,
pub entries: Vec<FileEntry>,
pub selected: usize,
pub selected_file: Option<PathBuf>,
pub show_hidden: bool,
pub extensions: Vec<String>,
pub dirty: bool,
}Expand description
State for a file picker widget.
Tracks the current directory listing, filtering options, and selected file.
Fields§
§current_dir: PathBufCurrent directory being browsed.
entries: Vec<FileEntry>Visible entries in the current directory.
selected: usizeSelected entry index in entries.
selected_file: Option<PathBuf>Currently selected file path, if any.
Whether dotfiles are included in the listing.
extensions: Vec<String>Allowed file extensions (lowercase, no leading dot).
dirty: boolWhether the directory listing needs refresh.
Implementations§
Source§impl FilePickerState
impl FilePickerState
Configure whether hidden files should be shown.
Sourcepub fn extensions(self, exts: &[&str]) -> Self
pub fn extensions(self, exts: &[&str]) -> Self
Restrict visible files to the provided extensions.
Trait Implementations§
Source§impl Clone for FilePickerState
impl Clone for FilePickerState
Source§fn clone(&self) -> FilePickerState
fn clone(&self) -> FilePickerState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FilePickerState
impl Debug for FilePickerState
Auto Trait Implementations§
impl Freeze for FilePickerState
impl RefUnwindSafe for FilePickerState
impl Send for FilePickerState
impl Sync for FilePickerState
impl Unpin for FilePickerState
impl UnsafeUnpin for FilePickerState
impl UnwindSafe for FilePickerState
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