pub struct ChildDeclaration {Show 16 fields
pub name: String,
pub kind: TaskKind,
pub criticality: Criticality,
pub tags: Vec<String>,
pub task_role: Option<TaskRole>,
pub sidecar_config: Option<SidecarConfig>,
pub severity: Option<SeverityClass>,
pub group: Option<String>,
pub restart_policy: RestartPolicy,
pub dependencies: Vec<String>,
pub health_check: Option<HealthCheckConfig>,
pub readiness: Option<ReadinessConfig>,
pub resource_limits: Option<ResourceLimits>,
pub command_permissions: Option<CommandPermissions>,
pub environment: Vec<EnvVar>,
pub secrets: Vec<SecretRef>,
}Expand description
Declarative child specification loaded from YAML or received via add_child RPC.
Fields§
§name: StringUnique child name used for ChildId generation.
kind: TaskKindTask kind.
criticality: CriticalityChild criticality.
Low-cardinality tags used for grouping and diagnostics.
task_role: Option<TaskRole>Optional task role that selects default lifecycle semantics.
sidecar_config: Option<SidecarConfig>Optional sidecar binding used when the role is sidecar.
severity: Option<SeverityClass>Optional severity classification that overrides the role default.
group: Option<String>Optional group name for group-level isolation and budget tracking.
restart_policy: RestartPolicyRestart policy.
dependencies: Vec<String>Child dependencies by name.
health_check: Option<HealthCheckConfig>Optional health check configuration.
readiness: Option<ReadinessConfig>Optional readiness check configuration.
resource_limits: Option<ResourceLimits>Optional resource limits.
command_permissions: Option<CommandPermissions>Optional command permissions.
environment: Vec<EnvVar>Environment variables.
secrets: Vec<SecretRef>Secret references.
Trait Implementations§
Source§impl Clone for ChildDeclaration
impl Clone for ChildDeclaration
Source§fn clone(&self) -> ChildDeclaration
fn clone(&self) -> ChildDeclaration
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ChildDeclaration
impl Debug for ChildDeclaration
Source§impl<'de> Deserialize<'de> for ChildDeclaration
impl<'de> Deserialize<'de> for ChildDeclaration
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for ChildDeclaration
impl JsonSchema for ChildDeclaration
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for ChildDeclaration
impl PartialEq for ChildDeclaration
Source§fn eq(&self, other: &ChildDeclaration) -> bool
fn eq(&self, other: &ChildDeclaration) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for ChildDeclaration
impl Serialize for ChildDeclaration
Source§impl TryFrom<ChildDeclaration> for ChildSpec
Converts a ChildDeclaration into a ChildSpec.
impl TryFrom<ChildDeclaration> for ChildSpec
Converts a ChildDeclaration into a ChildSpec.
Source§fn try_from(decl: ChildDeclaration) -> Result<Self, Self::Error>
fn try_from(decl: ChildDeclaration) -> Result<Self, Self::Error>
Converts a child declaration into a runtime child specification.
§Arguments
decl: The child declaration to convert.
§Returns
Returns a ChildSpec with mapped fields.
§Errors
Returns a ValidationError when the declaration cannot be converted.
Source§type Error = ValidationError
type Error = ValidationError
impl StructuralPartialEq for ChildDeclaration
Auto Trait Implementations§
impl Freeze for ChildDeclaration
impl RefUnwindSafe for ChildDeclaration
impl Send for ChildDeclaration
impl Sync for ChildDeclaration
impl Unpin for ChildDeclaration
impl UnsafeUnpin for ChildDeclaration
impl UnwindSafe for ChildDeclaration
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);