pub struct FileCapabilities {
pub read: bool,
pub write: bool,
pub create_dir: bool,
pub rename: bool,
pub remove: bool,
pub copy_entry: bool,
pub move_entry: bool,
pub remove_recursive: bool,
pub watch: bool,
}Expand description
Operations advertised by a filesystem provider.
Every boolean means that the corresponding operation is intended to be available. Capabilities are informational: trait default methods do not consult them, and an advertised operation can still fail for a resource.
§Examples
use ailloli_ui_fs::FileCapabilities;
assert!(FileCapabilities::READ_ONLY.read);
assert!(!FileCapabilities::READ_ONLY.write);Fields§
§read: boolDirectory listing, file reads, and metadata queries are available.
write: boolFile content writes are available.
create_dir: boolDirectory creation is available.
rename: boolSame-provider rename is available.
remove: boolNon-recursive removal is available.
copy_entry: boolEntry copy is available, either natively or through the trait default.
move_entry: boolEntry move is available, either natively or as rename.
remove_recursive: boolRecursive removal is available, either natively or through the trait default.
watch: boolNative directory watch events are available.
Implementations§
Source§impl FileCapabilities
impl FileCapabilities
Sourcepub const READ_ONLY: Self
pub const READ_ONLY: Self
Read-only profile: only read is true.
§Examples
use ailloli_ui_fs::FileCapabilities;
assert_eq!(FileCapabilities::READ_ONLY, FileCapabilities::default());Sourcepub const READ_WRITE: Self
pub const READ_WRITE: Self
Read/write profile with mutation and recursive helpers, but no watch.
§Examples
use ailloli_ui_fs::FileCapabilities;
assert!(FileCapabilities::READ_WRITE.remove_recursive);
assert!(!FileCapabilities::READ_WRITE.watch);Trait Implementations§
Source§impl Clone for FileCapabilities
impl Clone for FileCapabilities
Source§fn clone(&self) -> FileCapabilities
fn clone(&self) -> FileCapabilities
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more