pub struct FilePalette { /* private fields */ }Implementations§
Source§impl FilePalette
impl FilePalette
pub fn load_files(&mut self, files: Vec<String>)
pub fn set_filter(&mut self, query: String)
Sourcepub fn style_for_entry(&self, entry: &FileEntry) -> Option<Style>
pub fn style_for_entry(&self, entry: &FileEntry) -> Option<Style>
Get the appropriate style for a file entry based on its path and type
Source§impl FilePalette
impl FilePalette
pub fn move_selection_up(&mut self)
pub fn move_selection_down(&mut self)
pub fn move_to_first(&mut self)
pub fn move_to_last(&mut self)
pub fn page_up(&mut self)
pub fn page_down(&mut self)
pub fn get_selected(&self) -> Option<&FileEntry>
Sourcepub fn get_best_match(&self) -> Option<&FileEntry>
pub fn get_best_match(&self) -> Option<&FileEntry>
Get the best matching file entry based on current filter query Used for Tab autocomplete - returns the first filtered file if any exist
Sourcepub fn select_best_match(&mut self)
pub fn select_best_match(&mut self)
Set selection to the best match
pub fn current_page_items(&self) -> Vec<(usize, &FileEntry, bool)>
pub fn total_pages(&self) -> usize
pub fn current_page_number(&self) -> usize
pub fn total_items(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn filter_query(&self) -> &str
pub fn has_files(&self) -> bool
pub fn has_more_items(&self) -> bool
Auto Trait Implementations§
impl Freeze for FilePalette
impl RefUnwindSafe for FilePalette
impl Send for FilePalette
impl Sync for FilePalette
impl Unpin for FilePalette
impl UnsafeUnpin for FilePalette
impl UnwindSafe for FilePalette
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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