Enum FileExplorerAction

Source
pub enum FileExplorerAction {
Show 30 variants Select(FileUri), Open(FileUri), Toggle { uri: FileUri, expanded: bool, }, RenameRequested { uri: FileUri, }, Rename(FileExplorerRename), RemoveRequested { uri: FileUri, parent: Option<FileUri>, }, Remove { uri: FileUri, parent: Option<FileUri>, }, CreateFileRequested { parent: FileUri, }, CreateDirRequested { parent: FileUri, }, CreateFile(FileExplorerCreateFile), CreateDir(FileExplorerCreateDir), CopyPath { uri: FileUri, }, CopyRelativePath { uri: FileUri, }, CopyFile { uri: FileUri, }, CutFile { uri: FileUri, }, PasteInto { target_dir: FileUri, }, MoveEntry(FileExplorerMove), Refresh { uri: FileUri, }, OpenTerminalHere { uri: FileUri, }, SearchInFolder { uri: FileUri, }, RevealInWorkspace { uri: FileUri, }, AddFolderToWorkspace { uri: FileUri, }, RemoveFolderFromWorkspace { uri: FileUri, }, SetWorkspaceRoot { uri: FileUri, }, OpenWorkspaceHere { uri: FileUri, }, OpenWorkspaceSettings, CollapseAll, ExpandAll, RevealActiveFile, SearchInWorkspace,
}
Expand description

High-level intent emitted by snapshot and retained file explorers.

Requested variants start UI/application workflows; committed variants carry completed inline edit data. The widget never performs filesystem mutations. Context-menu items that require an absent handler are rendered disabled.

§Examples

use ailloli_ui_fs::FileUri;
use ailloli_ui_widgets::files::FileExplorerAction;
let uri = FileUri::parse("file:///repo/main.rs")?;
assert_eq!(FileExplorerAction::Select(uri.clone()), FileExplorerAction::Select(uri));

Variants§

§

Select(FileUri)

Row selection changed to the URI.

§

Open(FileUri)

A leaf or context-menu target was activated.

§

Toggle

A branch changed expansion state.

Fields

§uri: FileUri

Branch URI.

§expanded: bool

true for expanded, false for collapsed.

§

RenameRequested

UI should begin or authorize renaming this URI.

Fields

§uri: FileUri

Target URI before rename.

§

Rename(FileExplorerRename)

Inline rename was committed.

§

RemoveRequested

UI/application should confirm or begin removal.

Fields

§uri: FileUri

Target URI.

§parent: Option<FileUri>

Lexical parent when available.

§

Remove

Tree delete interaction was committed.

Fields

§uri: FileUri

Target URI.

§parent: Option<FileUri>

Lexical parent when available.

§

CreateFileRequested

UI should begin a file draft below the parent.

Fields

§parent: FileUri

Intended parent directory.

§

CreateDirRequested

UI should begin a directory draft below the parent.

Fields

§parent: FileUri

Intended parent directory.

§

CreateFile(FileExplorerCreateFile)

Inline file creation was committed.

§

CreateDir(FileExplorerCreateDir)

Inline directory creation was committed.

§

CopyPath

Copies an absolute/display path string through application integration.

Fields

§uri: FileUri

URI whose path is requested.

§

CopyRelativePath

Copies a path relative to its matching explorer root.

Fields

§uri: FileUri

URI whose relative path is requested.

§

CopyFile

Copies the file/directory entry to application clipboard state.

Fields

§uri: FileUri

Source URI.

§

CutFile

Cuts the entry into application clipboard state.

Fields

§uri: FileUri

Source URI.

§

PasteInto

Pastes clipboard content into a directory.

Fields

§target_dir: FileUri

Destination directory URI.

§

MoveEntry(FileExplorerMove)

Drag/drop move intent with resolved source/destination metadata.

§

Refresh

Requests refreshing one directory/workspace root.

Fields

§uri: FileUri

Directory URI to refresh.

§

OpenTerminalHere

Requests a terminal rooted at a directory.

Fields

§uri: FileUri

Directory URI.

§

SearchInFolder

Requests scoped search in a directory.

Fields

§uri: FileUri

Directory URI.

§

RevealInWorkspace

Requests revealing the entry in a workspace integration.

Fields

§uri: FileUri

Entry URI.

§

AddFolderToWorkspace

Adds a directory as a workspace root.

Fields

§uri: FileUri

Directory URI.

§

RemoveFolderFromWorkspace

Removes an existing explorer root from the workspace.

Fields

§uri: FileUri

Root URI.

§

SetWorkspaceRoot

Replaces the workspace root with a directory.

Fields

§uri: FileUri

New root URI.

§

OpenWorkspaceHere

Opens a workspace rooted at the URI.

Fields

§uri: FileUri

Workspace root URI.

§

OpenWorkspaceSettings

Opens workspace settings.

§

CollapseAll

Collapses all branches.

§

ExpandAll

Expands all branches.

§

RevealActiveFile

Reveals the application’s active file.

§

SearchInWorkspace

Opens workspace-wide search.

Trait Implementations§

Source§

impl Clone for FileExplorerAction

Source§

fn clone(&self) -> FileExplorerAction

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FileExplorerAction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for FileExplorerAction

Source§

fn eq(&self, other: &FileExplorerAction) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for FileExplorerAction

Source§

impl StructuralPartialEq for FileExplorerAction

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<A> IntoClickAction<A> for A
where A: Clone + 'static,

§

fn into_click_action(self) -> ClickAction<A>

Implements the into_click_action helper used by this module.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> Props for T
where T: Clone + 'static,