pub struct SmartFolder {
pub id: String,
pub name: String,
pub conditions: Vec<Value>,
pub children: Vec<SmartFolder>,
pub icon: Option<String>,
pub icon_color: Option<String>,
pub description: String,
pub order_by: Option<String>,
pub sort_increase: Option<bool>,
}Expand description
A smart folder, read from its JSON entry.
Fields§
§id: String§name: String§conditions: Vec<Value>§children: Vec<SmartFolder>§icon: Option<String>Icon name from crate::model::FOLDER_ICONS, if not the default.
icon_color: Option<String>Colour from crate::model::ICON_COLORS, if not the default.
description: String§order_by: Option<String>The smart folder’s own sort, as Eagle’s orderBy string.
sort_increase: Option<bool>Implementations§
Source§impl SmartFolder
impl SmartFolder
Sourcepub fn is_group(&self) -> bool
pub fn is_group(&self) -> bool
Whether this is a smart folder group: an entry with no conditions,
which shows the union of its children. Eagle stores no flag; its
“new group” command simply makes an entry with conditions: [].
Sourcepub fn walk<'a>(
&'a self,
path: &mut Vec<&'a SmartFolder>,
f: &mut impl FnMut(&'a SmartFolder, &[&'a SmartFolder]),
)
pub fn walk<'a>( &'a self, path: &mut Vec<&'a SmartFolder>, f: &mut impl FnMut(&'a SmartFolder, &[&'a SmartFolder]), )
Visits this smart folder and its descendants with their ancestry (outermost first).
Trait Implementations§
Source§impl Clone for SmartFolder
impl Clone for SmartFolder
Source§fn clone(&self) -> SmartFolder
fn clone(&self) -> SmartFolder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SmartFolder
impl Debug for SmartFolder
Source§impl PartialEq for SmartFolder
impl PartialEq for SmartFolder
impl StructuralPartialEq for SmartFolder
Auto Trait Implementations§
impl Freeze for SmartFolder
impl RefUnwindSafe for SmartFolder
impl Send for SmartFolder
impl Sync for SmartFolder
impl Unpin for SmartFolder
impl UnsafeUnpin for SmartFolder
impl UnwindSafe for SmartFolder
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
Mutably borrows from an owned value. Read more
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,
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> ⓘ
Converts
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> ⓘ
Converts
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