#[non_exhaustive]pub enum FileManagerMsg {
Show 29 variants
Select(String),
Choose(Vec<String>),
Expand(String, bool),
Read(String, Result<Vec<FolderEntry>, String>),
Listed(String, Result<Vec<FolderEntry>, FileError>),
NewFile(String),
NewFolder(String),
Rename(String),
Cut(String),
Copy(String),
Paste(String),
DropCut,
Drop(TreeDrop),
Delete(String),
DeleteConfirmed(Vec<String>),
Trash(String),
ShowHidden(bool),
Work(TaskEvent),
Stop,
Refresh,
Name(String),
Submit,
CloseNaming,
Done(Vec<(String, Result<FileChange, FileError>)>),
Changed(u64, Vec<FolderChange>),
Detail(Vec<String>),
Detailed(Vec<(String, Option<FileDetails>)>),
Enter(String),
Leave,
}Expand description
Something that happened in a FileManager.
Hand every one of these to FileManagerState::update; the application’s own messages come
from FileManager::on_open and the items it adds to the menu,
never from here.
More things may happen as the manager grows, so match with a _ arm; an application normally
hands every one of these straight over without looking.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Select(String)
The cursor moved to this key.
Choose(Vec<String>)
The entries of these keys became the selection.
Expand(String, bool)
The folder of this key was opened, or closed when false.
Read(String, Result<Vec<FolderEntry>, String>)
The folder of this key was read in the background, or could not be, by the application’s own reading. The text is the system’s own; hand it over as it comes.
Listed(String, Result<Vec<FolderEntry>, FileError>)
The folder of this key was read by the manager itself.
Why a read failed is kept as a FileError rather than as words, because the thread that
read the folder does not know the person’s language; the words are chosen here.
NewFile(String)
A new file was asked for in the folder of this key.
NewFolder(String)
A new folder was asked for in the folder of this key.
Rename(String)
The entry of this key was asked to take another name.
Cut(String)
The entry of this key was cut, with the rest of the selection when it is part of it, to be pasted into another folder.
Copy(String)
The entry of this key was copied, with the rest of the selection when it is part of it, to be pasted into another folder. What was copied stays where it is.
Paste(String)
What was cut was asked to go into the folder of this key.
DropCut
What was cut is to stay where it is after all.
Drop(TreeDrop)
Entries were dragged onto a folder, or onto the free space that stands for the root.
Delete(String)
The entry of this key was asked to be deleted, with the rest of the selection when it is part of it; the person is asked first.
DeleteConfirmed(Vec<String>)
The person said yes to deleting the entries of these keys.
Trash(String)
The entry of this key was asked to go to the trash, with the rest of the selection when it is part of it. Nothing is asked: the trash can be looked in again.
ShowHidden(bool)
Hidden entries are shown from now on, or hidden again when false.
Work(TaskEvent)
The long operation running now started, came further along or ended.
Stop
The long operation running now was asked to stop.
Refresh
Every open folder was asked to be read again.
Name(String)
The name in the dialog changed.
Submit
The name in the dialog was confirmed.
CloseNaming
The dialog was closed without a name.
Done(Vec<(String, Result<FileChange, FileError>)>)
Operations finished or were refused: for each entry its key and what came of it.
Changed(u64, Vec<FolderChange>)
A batch of outside changes of the watch u64 arrived; empty once that watch was let go.
Detail(Vec<String>)
The details of the entries of these keys were asked for: their size, when they changed and their permissions. Keys that are already known, or already on their way, cost nothing.
Detailed(Vec<(String, Option<FileDetails>)>)
The details of these keys were read, None for an entry the system said nothing about.
Enter(String)
A flat view stepped into the folder of this key; it is read if it has not been.
Leave
A flat view stepped out of the folder it shows, into the one above it.
Trait Implementations§
Source§impl Clone for FileManagerMsg
impl Clone for FileManagerMsg
Source§fn clone(&self) -> FileManagerMsg
fn clone(&self) -> FileManagerMsg
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for FileManagerMsg
impl RefUnwindSafe for FileManagerMsg
impl Send for FileManagerMsg
impl Sync for FileManagerMsg
impl Unpin for FileManagerMsg
impl UnsafeUnpin for FileManagerMsg
impl UnwindSafe for FileManagerMsg
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
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> ⓘ
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> ⓘ
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