pub struct FileBrowserState {
pub entries: Vec<FileEntry>,
pub items: Vec<(String, Style)>,
pub cwd: PathBuf,
pub choose_popup_state: ChoosePopupState,
pub show_hidden: bool,
}Fields§
§entries: Vec<FileEntry>§items: Vec<(String, Style)>§cwd: PathBuf§choose_popup_state: ChoosePopupStateImplementations§
Source§impl FileBrowserState
impl FileBrowserState
pub fn go_up(&mut self)
pub fn enter_directory(&mut self)
pub fn selected_entry(&self) -> Option<&FileEntry>
pub fn current_path(&self) -> Option<PathBuf>
pub fn select(&mut self, index: usize)
pub fn next(&mut self)
pub fn previous(&mut self)
pub fn first(&mut self)
pub fn last(&mut self)
pub fn toggle(&mut self, idx: usize)
pub fn toggle_cursor(&mut self)
pub fn chosen_indices(&self) -> &HashSet<usize>
pub fn chosen_paths(&self) -> Vec<PathBuf>
pub fn show_filter(&self) -> bool
pub fn set_show_filter(&mut self, show: bool)
pub fn insert_filter_char(&mut self, c: char)
pub fn delete_before_filter(&mut self)
pub fn delete_at_filter(&mut self)
pub fn filter_cursor_left(&mut self)
pub fn filter_cursor_right(&mut self)
pub fn filter_cursor_home(&mut self)
pub fn filter_cursor_end(&mut self)
pub fn filtered_indices(&self) -> Vec<usize>
pub fn visible_count(&self) -> usize
pub fn original_index(&self) -> Option<usize>
pub fn filter_content(&self) -> &str
pub fn max_selected(&self) -> Option<usize>
pub fn set_max_selected(&mut self, max: Option<usize>)
Trait Implementations§
Source§impl Clone for FileBrowserState
impl Clone for FileBrowserState
Source§fn clone(&self) -> FileBrowserState
fn clone(&self) -> FileBrowserState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FileBrowserState
impl RefUnwindSafe for FileBrowserState
impl Send for FileBrowserState
impl Sync for FileBrowserState
impl Unpin for FileBrowserState
impl UnsafeUnpin for FileBrowserState
impl UnwindSafe for FileBrowserState
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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