pub struct EntryOptions {
pub id: Option<String>,
pub name: String,
pub disabled: bool,
pub inject: Vec<String>,
pub group: Vec<EntryOptions>,
pub config: Option<Node>,
}Expand description
One entry in a config file: a plugin instance plus its group position.
The declared field order is the serialization order (id and name
first, config last), keeping files readable and diff-stable. Entries
with a group array are groups; the array order is the child order.
config is stored raw: ${{ env.NAME }} templates stay intact in the
entry tree and are only expanded when the config is handed to a plugin
(see crate::Entry::resolved_config).
Fields§
§id: Option<String>Stable identity of the entry. Missing ids are filled with a random 6-character base36 id when the entry enters a tree and persisted on the next write-back.
name: StringPlugin name used to resolve the plugin implementation.
disabled: boolWhether the entry (and transitively its subtree) is disabled.
inject: Vec<String>Names of services that must be active before this entry starts.
group: Vec<EntryOptions>Child entries, in order. Non-empty only for group entries.
config: Option<Node>Raw plugin configuration (templates unexpanded).
Implementations§
Source§impl EntryOptions
impl EntryOptions
Sourcepub fn with_config(self, config: Node) -> Self
pub fn with_config(self, config: Node) -> Self
Set the raw plugin configuration.
Sourcepub fn with_group(self, group: Vec<EntryOptions>) -> Self
pub fn with_group(self, group: Vec<EntryOptions>) -> Self
Set the child entries (turning this entry into a group).
Sourcepub fn with_disabled(self, disabled: bool) -> Self
pub fn with_disabled(self, disabled: bool) -> Self
Mark the entry (and its subtree) as disabled.
Sourcepub fn import_url(&self) -> Option<&str>
pub fn import_url(&self) -> Option<&str>
The url this import entry mounts, when the entry is an import
(name: import with a string config.url).
Sourcepub fn with_inject<I, S>(self, inject: I) -> Self
pub fn with_inject<I, S>(self, inject: I) -> Self
Declare services that must be active before this entry starts.
Trait Implementations§
Source§impl Clone for EntryOptions
impl Clone for EntryOptions
Source§fn clone(&self) -> EntryOptions
fn clone(&self) -> EntryOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more