pub struct FileBrowser {
pub selected_index: usize,
pub scroll_offset: usize,
}Expand description
File browser state and rendering.
Fields§
§selected_index: usize§scroll_offset: usizeImplementations§
Source§impl FileBrowser
impl FileBrowser
pub fn new() -> Self
pub fn move_up(&mut self)
pub fn move_down(&mut self, max: usize)
pub fn get_selected_entry(&self, dir: &Path) -> Option<PathBuf>
pub fn get_entry_count(&self, dir: &Path) -> usize
pub fn render( &mut self, f: &mut Frame<'_>, area: Rect, app: &AppState<'_>, theme: &Theme, )
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileBrowser
impl RefUnwindSafe for FileBrowser
impl Send for FileBrowser
impl Sync for FileBrowser
impl Unpin for FileBrowser
impl UnwindSafe for FileBrowser
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§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> 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