pub struct Executor {
pub registry: TransformRegistry,
}Expand description
Stateless executor that drives a single HyperEdge.
Fields§
§registry: TransformRegistryImplementations§
Source§impl Executor
impl Executor
Sourcepub fn new(registry: TransformRegistry) -> Self
pub fn new(registry: TransformRegistry) -> Self
Create an executor backed by the given transform registry.
Sourcepub async fn execute(
&self,
edge: &HyperEdge,
port_values: &mut HashMap<PortId, Value>,
) -> Result<(), EngineError>
pub async fn execute( &self, edge: &HyperEdge, port_values: &mut HashMap<PortId, Value>, ) -> Result<(), EngineError>
Execute one edge.
- Collect input values from
port_values[sources]. Missing source ports resolve toValue::Null. - Evaluate the edge transform (may be async).
- Write the result into
port_valuesfor every target port.
Auto Trait Implementations§
impl Freeze for Executor
impl !RefUnwindSafe for Executor
impl Send for Executor
impl Sync for Executor
impl Unpin for Executor
impl UnsafeUnpin for Executor
impl !UnwindSafe for Executor
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
Mutably borrows from an owned value. Read more