pub struct Dependency {
pub name: String,
pub version: String,
pub repository: String,
pub enabled: bool,
pub condition: Option<String>,
pub resolve: ResolvePolicy,
pub tags: Vec<String>,
pub alias: Option<String>,
}Expand description
Pack dependency
Fields§
§name: StringDependency name
version: StringVersion constraint (semver)
repository: StringRepository URL
enabled: boolStatic enable/disable flag
When false, this dependency is completely ignored during resolution.
Unlike condition, this is evaluated at parse time, not against values.
Defaults to true.
condition: Option<String>Runtime condition expression
A dot-separated path evaluated against values.yaml.
Example: redis.enabled checks values.redis.enabled.
When combined with resolve: when-enabled, the condition is evaluated
at resolution time to skip downloading disabled dependencies.
resolve: ResolvePolicyResolution policy
Controls when this dependency is resolved/downloaded.
Defaults to when-enabled.
Tags for conditional inclusion
alias: Option<String>Alias name (overrides dependency name in templates)
Implementations§
Source§impl Dependency
impl Dependency
Sourcepub fn effective_name(&self) -> &str
pub fn effective_name(&self) -> &str
Get the effective name (alias if set, otherwise name)
Sourcepub fn should_resolve(&self, values: &Value) -> bool
pub fn should_resolve(&self, values: &Value) -> bool
Check if this dependency should be resolved given the current values
Returns false if:
enabledisfalseresolveisNeverresolveisWhenEnabledand condition evaluates tofalse
Trait Implementations§
Source§impl Clone for Dependency
impl Clone for Dependency
Source§fn clone(&self) -> Dependency
fn clone(&self) -> Dependency
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more