Skip to main content

Element

Struct Element 

Source
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: ElementName

Unique identifier within a test plan.

§labels: Labels

Intrinsic facts. Must contain a type entry whose value is registered in the type descriptor registry.

§tags: Tags

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: Configuration

Authored parameter bindings (literal values or token references). Axis bindings override these per trial; see SRD-0007 D21.

§exports: Exports

Named 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: ShutdownSemantics

How 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

Source

pub fn builder() -> ElementBuilder

Create an instance of Element using the builder syntax

Source§

impl Element

Source

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.

Trait Implementations§

Source§

impl Attributed for Element

Source§

fn labels(&self) -> &Labels

Intrinsic facts.
Source§

fn tags(&self) -> &Tags

Extrinsic organisation.
Source§

impl Clone for Element

Source§

fn clone(&self) -> Element

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Element

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Element

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Element

Source§

fn eq(&self, other: &Element) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Pluggable for Element

Source§

fn plugs(&self) -> &[Plug]

The element’s plugs.
Source§

fn sockets(&self) -> &[Socket]

The element’s sockets.
Source§

impl Serialize for Element

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Element

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,