pub struct FileExplorerRow {
pub uri: FileUri,
pub name: String,
pub kind: FileKind,
pub depth: usize,
pub branch: bool,
pub disabled: bool,
pub icon: IconId,
}Expand description
Flat visible row produced from a recursive FileExplorerNode tree.
§Examples
use ailloli_ui_fs::FileUri;
use ailloli_ui_widgets::files::{flatten_file_nodes, FileExplorerNode};
let nodes = [FileExplorerNode::file(FileUri::parse("file:///a")?, "a")];
let row = flatten_file_nodes(&nodes, &[]).remove(0);
assert_eq!((row.name.as_str(), row.depth, row.branch), ("a", 0, false));Fields§
§uri: FileUriStable URI used for selection and expansion matching.
name: StringVisible label copied from the node entry.
kind: FileKindRaw filesystem kind copied from metadata.
depth: usizeZero-based nesting depth in the flattened output.
branch: boolWhether the row can expose descendants.
disabled: boolWhether interaction is disabled.
icon: IconIdIcon derived from entry metadata and name.
Trait Implementations§
Source§impl Clone for FileExplorerRow
impl Clone for FileExplorerRow
Source§fn clone(&self) -> FileExplorerRow
fn clone(&self) -> FileExplorerRow
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FileExplorerRow
impl Debug for FileExplorerRow
Source§impl PartialEq for FileExplorerRow
impl PartialEq for FileExplorerRow
impl Eq for FileExplorerRow
impl StructuralPartialEq for FileExplorerRow
Auto Trait Implementations§
impl Freeze for FileExplorerRow
impl RefUnwindSafe for FileExplorerRow
impl Send for FileExplorerRow
impl Sync for FileExplorerRow
impl Unpin for FileExplorerRow
impl UnwindSafe for FileExplorerRow
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
Mutably borrows from an owned value. Read more
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
Compare self to
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.