#[non_exhaustive]pub enum FileExplorerModelEvent<T> {
Select {
node_id: T,
uri: FileUri,
},
Open {
node_id: T,
uri: FileUri,
},
Toggle {
node_id: T,
uri: FileUri,
expanded: bool,
},
Rename {
node_id: T,
rename: FileExplorerRename,
},
Create {
node_id: T,
parent_id: T,
kind: FileKind,
uri: FileUri,
name: String,
},
CancelCreate {
node_id: T,
},
Move {
node_id: T,
target_parent_id: T,
movement: FileExplorerMove,
},
}Expand description
Identity-aware event emitted by RetainedFileExplorer. The opaque node
IDs let a filesystem coordinator mutate its store without rediscovering a
node from a path that may already have changed.
§Examples
use ailloli_ui_fs::FileUri;
use ailloli_ui_widgets::files::FileExplorerModelEvent;
let event = FileExplorerModelEvent::Select { node_id: 7_u64, uri: FileUri::parse("file:///a")? };
assert!(matches!(event, FileExplorerModelEvent::Select { node_id: 7, .. }));Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Select
Selection changed to an existing retained node.
Open
An existing retained leaf was activated.
Toggle
Expansion changed for an existing retained branch.
Rename
Inline rename committed for an existing retained node.
Create
Inline create committed using a previously reserved identity.
Fields
node_id: TReserved identity for the new node.
parent_id: TExisting destination parent identity.
kind: FileKindRequested file or directory kind.
uri: FileUriProposed destination URI.
CancelCreate
Inline create was cancelled and the reserved identity was released.
Fields
node_id: TReleased draft identity.
Move
Valid drag/drop move resolved to retained identities.
Fields
node_id: TMoved node identity.
target_parent_id: TDestination parent identity.
movement: FileExplorerMoveURI-level move payload.
Trait Implementations§
Source§impl<T: Clone> Clone for FileExplorerModelEvent<T>
impl<T: Clone> Clone for FileExplorerModelEvent<T>
Source§fn clone(&self) -> FileExplorerModelEvent<T>
fn clone(&self) -> FileExplorerModelEvent<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<T: Debug> Debug for FileExplorerModelEvent<T>
impl<T: Debug> Debug for FileExplorerModelEvent<T>
Source§impl<T: PartialEq> PartialEq for FileExplorerModelEvent<T>
impl<T: PartialEq> PartialEq for FileExplorerModelEvent<T>
impl<T: Eq> Eq for FileExplorerModelEvent<T>
impl<T> StructuralPartialEq for FileExplorerModelEvent<T>
Auto Trait Implementations§
impl<T> Freeze for FileExplorerModelEvent<T>where
T: Freeze,
impl<T> RefUnwindSafe for FileExplorerModelEvent<T>where
T: RefUnwindSafe,
impl<T> Send for FileExplorerModelEvent<T>where
T: Send,
impl<T> Sync for FileExplorerModelEvent<T>where
T: Sync,
impl<T> Unpin for FileExplorerModelEvent<T>where
T: Unpin,
impl<T> UnwindSafe for FileExplorerModelEvent<T>where
T: UnwindSafe,
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.