Skip to main content

Registry

Struct Registry 

Source
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

Source

pub fn new() -> Self

Constructs an empty registry.

Source

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.

Trait Implementations§

Source§

impl Default for Registry

Source§

fn default() -> Registry

Returns the “default value” for a type. Read more

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> 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, 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.