pub struct Folder {Show 16 fields
pub id: String,
pub name: String,
pub description: String,
pub children: Vec<Folder>,
pub modification_time: u64,
pub tags: Vec<String>,
pub extend_tags: Option<Vec<String>>,
pub icon: Option<String>,
pub icon_color: Option<String>,
pub pinyin: Option<String>,
pub password: String,
pub password_tips: String,
pub cover_id: Option<String>,
pub order_by: Option<String>,
pub sort_increase: Option<bool>,
pub extra: Extra,
}Expand description
A node in the folder tree.
Eagle writes the keys in this order: id, name, description,
children, modificationTime, tags, extendTags, icon, iconColor,
pinyin, password, passwordTips, coverId, then orderBy and
sortIncrease when the folder has its own sort. Optional keys are left
out when unset, as JSON.stringify drops undefined.
Fields§
§id: StringFolder id.
name: StringDisplay name.
description: StringFree-form description.
children: Vec<Folder>Child folders.
modification_time: u64Creation time, ms since epoch. Eagle sets it when the folder is created or duplicated and leaves it alone on later edits.
Tags attached to the folder.
The folder’s tags plus its ancestors’. A runtime cache Eagle’s writer strips; kept only so a file holding it round-trips.
icon: Option<String>Icon name from FOLDER_ICONS; absent for the default folder icon.
icon_color: Option<String>Icon colour from ICON_COLORS; absent for the default colour.
pinyin: Option<String>Romanised name for search. Also a runtime cache Eagle’s writer strips.
password: StringBase64 of the password’s Latin-1 bytes, or empty when unset. See
Folder::is_locked.
password_tips: StringPassword hint (empty when unset).
cover_id: Option<String>Id of the item shown as the folder’s cover.
order_by: Option<String>The folder’s own sort key (see FolderOrder); absent to follow the
global sort.
sort_increase: Option<bool>Ascending when true; written alongside orderBy.
extra: ExtraUnknown keys.
Implementations§
Source§impl Folder
impl Folder
Sourcepub fn new(
id: impl Into<String>,
name: impl Into<String>,
modification_time: u64,
) -> Folder
pub fn new( id: impl Into<String>, name: impl Into<String>, modification_time: u64, ) -> Folder
A new, empty folder in the shape Eagle writes.
Sourcepub fn walk<'a>(&'a self, f: &mut impl FnMut(&'a Folder))
pub fn walk<'a>(&'a self, f: &mut impl FnMut(&'a Folder))
Visits this folder and all descendants, depth first.
Sourcepub fn order(&self) -> Option<FolderOrder>
pub fn order(&self) -> Option<FolderOrder>
The folder’s own sort, if it has one Eagle knows.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Folder
impl<'de> Deserialize<'de> for Folder
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 StructuralPartialEq for Folder
Auto Trait Implementations§
impl Freeze for Folder
impl RefUnwindSafe for Folder
impl Send for Folder
impl Sync for Folder
impl Unpin for Folder
impl UnsafeUnpin for Folder
impl UnwindSafe for Folder
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> 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