pub struct FileState {
pub current_file: Option<PathBuf>,
pub current_dir: PathBuf,
pub selected_files: Vec<PathBuf>,
pub history: Vec<ConversionHistory>,
pub is_modified: bool,
}Expand description
File browser and conversion history state.
Fields§
§current_file: Option<PathBuf>§current_dir: PathBuf§selected_files: Vec<PathBuf>§history: Vec<ConversionHistory>§is_modified: boolImplementations§
Source§impl FileState
impl FileState
pub fn new() -> Self
pub fn set_current_file(&mut self, path: PathBuf)
pub fn clear_current_file(&mut self)
pub fn mark_modified(&mut self)
pub fn add_to_history(&mut self, entry: ConversionHistory)
pub fn toggle_file_selection(&mut self, path: PathBuf)
pub fn clear_selection(&mut self)
pub fn is_selected(&self, path: &PathBuf) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileState
impl RefUnwindSafe for FileState
impl Send for FileState
impl Sync for FileState
impl Unpin for FileState
impl UnwindSafe for FileState
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