pub struct ServiceDependency { /* private fields */ }Expand description
One ordered dependency edge from a service to another application service.
Optional fields distinguish source defaults from explicitly authored values. The surrounding
Sourced value carries the referenced service-name provenance, while each option retains its
own field-level provenance.
Implementations§
Source§impl ServiceDependency
impl ServiceDependency
Sourcepub const fn new(service: Identifier) -> Self
pub const fn new(service: Identifier) -> Self
Creates an edge using source-format defaults for readiness, restart propagation, and requirement strength.
Sourcepub const fn service(&self) -> &Identifier
pub const fn service(&self) -> &Identifier
Returns the referenced application service.
Sourcepub fn set_condition(&mut self, condition: Sourced<ServiceDependencyCondition>)
pub fn set_condition(&mut self, condition: Sourced<ServiceDependencyCondition>)
Sets the explicitly authored readiness condition.
Sourcepub const fn condition(&self) -> Option<&Sourced<ServiceDependencyCondition>>
pub const fn condition(&self) -> Option<&Sourced<ServiceDependencyCondition>>
Returns the explicitly authored readiness condition, if any.
Sourcepub fn set_restart(&mut self, restart: Sourced<bool>)
pub fn set_restart(&mut self, restart: Sourced<bool>)
Retains whether source-controlled dependency updates restart the dependent service.
Sourcepub const fn restart(&self) -> Option<&Sourced<bool>>
pub const fn restart(&self) -> Option<&Sourced<bool>>
Returns the explicit restart-propagation choice, if any.
Sourcepub fn set_required(&mut self, required: Sourced<bool>)
pub fn set_required(&mut self, required: Sourced<bool>)
Retains whether absence or failure of the dependency blocks the dependent service.
Sourcepub const fn required(&self) -> Option<&Sourced<bool>>
pub const fn required(&self) -> Option<&Sourced<bool>>
Returns the explicit requirement-strength choice, if any.
Sourcepub fn is_required(&self) -> bool
pub fn is_required(&self) -> bool
Returns the effective source requirement, including the default of true.
Trait Implementations§
Source§impl Clone for ServiceDependency
impl Clone for ServiceDependency
Source§fn clone(&self) -> ServiceDependency
fn clone(&self) -> ServiceDependency
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more