pub struct Element {Show 15 fields
pub name: ElementName,
pub labels: Labels,
pub tags: Tags,
pub plugs: Vec<Plug>,
pub sockets: Vec<Socket>,
pub parameters: Vec<Parameter>,
pub result_parameters: Vec<Parameter>,
pub configuration: Configuration,
pub exports: Exports,
pub dependencies: Vec<Dependency>,
pub health_check: Option<HealthCheckSpec>,
pub shutdown_semantics: ShutdownSemantics,
pub trial_element: Option<bool>,
pub max_concurrency: Option<u32>,
pub max_group_concurrency: Option<u32>,
}Expand description
One element in the Element Graph.
Every field is serialisable so the struct round-trips through plan
storage and the wire unchanged. Run Self::validate after
construction — the builder assembles the shape, validation enforces
the cross-cutting invariants.
Fields§
§name: ElementNameUnique identifier within a test plan.
labels: LabelsIntrinsic facts. Must contain a type entry whose value is
registered in the type descriptor registry.
Extrinsic organisation (owner, priority, environment, …).
plugs: Vec<Plug>Points where this element needs upstream connections.
sockets: Vec<Socket>Points where downstream elements can connect to this one.
parameters: Vec<Parameter>Configurable input dimensions.
result_parameters: Vec<Parameter>Typed output dimensions this element publishes after materialization.
configuration: ConfigurationAuthored parameter bindings (literal values or token references). Axis bindings override these per trial; see SRD-0007 D21.
exports: ExportsNamed values this element publishes to downstreams.
dependencies: Vec<Dependency>Typed dependency edges — the Element Graph edges.
health_check: Option<HealthCheckSpec>Readiness-check timing. None → ready immediately after
starting.
shutdown_semantics: ShutdownSemanticsHow this element terminates.
trial_element: Option<bool>Explicit trial-element override. None → auto-detect via
reducto’s leaf-node heuristic.
max_concurrency: Option<u32>Max active instances of this element globally.
max_group_concurrency: Option<u32>Max active instances within one coalesced group.
Implementations§
Source§impl Element
impl Element
Sourcepub fn builder() -> ElementBuilder
pub fn builder() -> ElementBuilder
Create an instance of Element using the builder syntax
Source§impl Element
impl Element
Sourcepub fn validate(
&self,
registry: &dyn ElementTypeDescriptorRegistry,
) -> Result<(), ElementError>
pub fn validate( &self, registry: &dyn ElementTypeDescriptorRegistry, ) -> Result<(), ElementError>
Validate the element against a type-descriptor registry.
Enforces SRD-0007 invariants: type label is registered,
required / forbidden labels match the descriptor, parameter
names are unique in each list, configuration keys reference
real parameters, namespace uniqueness across labels / tags /
ports / parameter names, and concurrency caps are sane.