pub struct Executor<'a, H: NodeHandler> { /* private fields */ }Expand description
Runtime executor for planner-generated runtime plans.
use daedalus_runtime::executor::Executor;
use daedalus_planner::{ExecutionPlan, Graph};
use daedalus_runtime::RuntimePlan;
fn handler(
_node: &daedalus_runtime::RuntimeNode,
_ctx: &daedalus_runtime::state::ExecutionContext,
_io: &mut daedalus_runtime::io::NodeIo,
) -> Result<(), daedalus_runtime::executor::NodeError> {
Ok(())
}
let plan = RuntimePlan::from_execution(&ExecutionPlan::new(Graph::default(), vec![]));
let _exec = Executor::new(&plan, handler);Implementations§
Source§impl<'a, H: NodeHandler> Executor<'a, H>
impl<'a, H: NodeHandler> Executor<'a, H>
Sourcepub fn new(plan: &'a RuntimePlan, handler: H) -> Self
pub fn new(plan: &'a RuntimePlan, handler: H) -> Self
Build an executor from a runtime plan and handler.
Sourcepub fn with_const_coercers(self, coercers: ConstCoercerMap) -> Self
pub fn with_const_coercers(self, coercers: ConstCoercerMap) -> Self
Provide a shared constant coercer registry (used by dynamic plugins).
Sourcepub fn with_output_movers(self, movers: OutputMoverMap) -> Self
pub fn with_output_movers(self, movers: OutputMoverMap) -> Self
Provide a shared output mover registry (used by dynamic plugins).
Sourcepub fn with_state(self, state: StateStore) -> Self
pub fn with_state(self, state: StateStore) -> Self
Inject shared state store (optional).
pub fn without_gpu(self) -> Self
Sourcepub fn with_pool_size(self, size: Option<usize>) -> Self
pub fn with_pool_size(self, size: Option<usize>) -> Self
Override pool size when using the pool-based parallel executor.
pub fn with_metrics_level(self, level: MetricsLevel) -> Self
Sourcepub fn with_host_bridges(self, mgr: HostBridgeManager) -> Self
pub fn with_host_bridges(self, mgr: HostBridgeManager) -> Self
Attach a host bridge manager to enable implicit host I/O nodes.
Sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Reset per-run state (queues, telemetry, warnings) so this executor can be reused.
Sourcepub fn run(self) -> Result<ExecutionTelemetry, ExecuteError>
pub fn run(self) -> Result<ExecutionTelemetry, ExecuteError>
Execute the runtime plan serially in segment order.
Sourcepub fn run_in_place(&mut self) -> Result<ExecutionTelemetry, ExecuteError>
pub fn run_in_place(&mut self) -> Result<ExecutionTelemetry, ExecuteError>
Execute the runtime plan serially without rebuilding the executor.
Sourcepub fn run_parallel(self) -> Result<ExecutionTelemetry, ExecuteError>
pub fn run_parallel(self) -> Result<ExecutionTelemetry, ExecuteError>
Execute the runtime plan allowing independent segments to run in parallel.
Sourcepub fn run_parallel_in_place(
&mut self,
) -> Result<ExecutionTelemetry, ExecuteError>
pub fn run_parallel_in_place( &mut self, ) -> Result<ExecutionTelemetry, ExecuteError>
Execute the runtime plan in parallel without rebuilding the executor.
Auto Trait Implementations§
impl<'a, H> Freeze for Executor<'a, H>
impl<'a, H> RefUnwindSafe for Executor<'a, H>where
H: RefUnwindSafe,
impl<'a, H> Send for Executor<'a, H>
impl<'a, H> Sync for Executor<'a, H>
impl<'a, H> Unpin for Executor<'a, H>
impl<'a, H> UnwindSafe for Executor<'a, H>where
H: RefUnwindSafe,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more