Skip to main content

GraphNodeExecutor

Trait GraphNodeExecutor 

Source
pub trait GraphNodeExecutor:
    Send
    + Sync
    + 'static {
    // Required methods
    fn graph(&self) -> &GraphReference;
    fn node_id(&self) -> &NodeId;
    fn execute(
        &self,
        context: GraphNodeContext,
    ) -> BoxFuture<'_, Result<GraphNodeExecution, GraphNodeExecutionError>>;

    // Provided methods
    fn scheduling(&self) -> GraphNodeScheduling { ... }
    fn supports_child_join(&self) -> bool { ... }
}
Expand description

Object-safe executable implementation of one exact graph node.

Required Methods§

Source

fn graph(&self) -> &GraphReference

Returns the whole immutable graph definition this code was built for.

Source

fn node_id(&self) -> &NodeId

Returns the stable compiled node identity implemented by this code.

Source

fn execute( &self, context: GraphNodeContext, ) -> BoxFuture<'_, Result<GraphNodeExecution, GraphNodeExecutionError>>

Executes exactly one already-durably-started physical attempt.

Provided Methods§

Source

fn scheduling(&self) -> GraphNodeScheduling

Declares whether this trusted binding may overlap ready siblings.

Existing implementations remain exclusive. Returning GraphNodeScheduling::JournalIsolated is a trusted production contract, not a performance hint.

Source

fn supports_child_join(&self) -> bool

Opts into child suspension/resumption. The registry requires declared child slots, exclusive scheduling and the embedded child Join schema.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§