pub struct TreeConfig {
pub dirs_first: bool,
pub sort_key: String,
pub sort_ascending: bool,
pub show_hidden: bool,
pub font_size: u32,
pub icon_size: u32,
pub confirm_drop_move: bool,
}Expand description
Sorting and visibility rules for the tree.
Fields§
§dirs_first: boolWhen true, directories are listed before files; otherwise everything is interleaved and only alphabetically sorted. Names are always sorted alphabetically (case-insensitively).
sort_key: StringPrimary sort key: name, size, modified, or type.
sort_ascending: boolSort ascending (A→Z, smallest first) when true; descending otherwise.
Show dotfiles. When false, hidden entries are never read into the model.
font_size: u32Base font size in px applied to the tree.
icon_size: u32Pixel size of file/directory icons in the tree.
confirm_drop_move: boolWhen true, dropping a dragged selection onto a directory asks for confirmation before moving; when false (the default) the move happens immediately. Copying (Ctrl+drag) never asks.
Implementations§
Source§impl TreeConfig
impl TreeConfig
Sourcepub fn sort_options(&self) -> SortOptions
pub fn sort_options(&self) -> SortOptions
Translate the configured sort fields into a [SortOptions]. Unknown
sort_key values fall back to name.
Trait Implementations§
Source§impl Clone for TreeConfig
impl Clone for TreeConfig
Source§impl Debug for TreeConfig
impl Debug for TreeConfig
Source§impl Default for TreeConfig
impl Default for TreeConfig
Source§impl<'de> Deserialize<'de> for TreeConfig
impl<'de> Deserialize<'de> for TreeConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for TreeConfig
Source§impl PartialEq for TreeConfig
impl PartialEq for TreeConfig
Source§impl Serialize for TreeConfig
impl Serialize for TreeConfig
impl StructuralPartialEq for TreeConfig
Auto Trait Implementations§
impl Freeze for TreeConfig
impl RefUnwindSafe for TreeConfig
impl Send for TreeConfig
impl Sync for TreeConfig
impl Unpin for TreeConfig
impl UnsafeUnpin for TreeConfig
impl UnwindSafe for TreeConfig
Blanket Implementations§
Source§impl<C> AsyncPosition<()> for C
impl<C> AsyncPosition<()> for C
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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