pub struct Entry { /* private fields */ }Expand description
A live entry in an crate::EntryTree.
Entry is a cheap handle (interior Arc); two handles refer to the same
entry exactly when Entry::ptr_eq says so. The loader attaches the
entry’s Fiber here and uses Entry::suspend to suppress write-back
while applying changes that originate from the config file itself.
Implementations§
Source§impl Entry
impl Entry
Sourcepub fn ptr_eq(left: &Entry, right: &Entry) -> bool
pub fn ptr_eq(left: &Entry, right: &Entry) -> bool
Whether both handles refer to the same entry.
Sourcepub fn options(&self) -> EntryOptions
pub fn options(&self) -> EntryOptions
A snapshot of the raw entry options (config templates unexpanded,
group always empty — children are live tree state).
Sourcepub fn resolved_config(&self) -> Result<Option<Node>>
pub fn resolved_config(&self) -> Result<Option<Node>>
The config with ${{ env.NAME }} templates expanded, ready to be
handed to a plugin as cordis_rs::Value::new(node).
Sourcepub fn parent(&self) -> Option<Entry>
pub fn parent(&self) -> Option<Entry>
The parent entry, or None for the tree root and detached entries.
Sourcepub fn is_group(&self) -> bool
pub fn is_group(&self) -> bool
Whether this entry currently has children (i.e. acts as a group).
Sourcepub fn enabled(&self) -> bool
pub fn enabled(&self) -> bool
Whether the entry and every ancestor are enabled. A disabled group cascades to its whole subtree.
Sourcepub fn fiber(&self) -> Option<Fiber>
pub fn fiber(&self) -> Option<Fiber>
The fiber started for this entry, if any (set by the loader layer).
Sourcepub fn suspend(&self) -> EntrySuspendGuard
pub fn suspend(&self) -> EntrySuspendGuard
Increment the suspend counter, returning a guard. While suspended, the loader suppresses config write-back for this entry.
Sourcepub fn is_suspended(&self) -> bool
pub fn is_suspended(&self) -> bool
Whether any suspend guard is currently held for this entry.