pub struct Registry { /* private fields */ }Expand description
The draft-time collection of Operation types known to a
pipeline.
Every call to
Pipeline::step registers
the operation type (idempotently), validates its
OperationMetadata, and records a factory that the runtime uses
to dispatch execution. Child pipelines created by the *_from_child
methods merge their registries into the parent. End users do not
typically touch the registry directly — it is exposed primarily so
tooling that walks compiled pipelines can inspect what operations
are available.
Implementations§
Source§impl Registry
impl Registry
Sourcepub fn register<O: Operation + 'static>(&mut self) -> Result<(), DraftError>
pub fn register<O: Operation + 'static>(&mut self) -> Result<(), DraftError>
Registers an Operation type. Idempotent — subsequent calls
for the same type are no-ops. Validates the returned
OperationMetadata and fails with
DraftError::InvalidMetadata if any declared output or
extension uses a NameSpec::DerivedFrom that references a
non-existent or wrongly-typed input.