pub struct SequentialExecutor<'a> { /* private fields */ }Expand description
Simulates execution of an ExecutionPlan sequentially on the CPU.
Instantiate with a plan, then call run to execute it.
Implementations§
Source§impl<'a> SequentialExecutor<'a>
impl<'a> SequentialExecutor<'a>
Sourcepub fn new(plan: &'a ExecutionPlan) -> Self
pub fn new(plan: &'a ExecutionPlan) -> Self
Creates a new executor for the given plan.
Sourcepub fn run(&self) -> GraphResult<ExecutionStats>
pub fn run(&self) -> GraphResult<ExecutionStats>
Executes all steps in submission order.
Returns ExecutionStats summarising what was executed.
§Errors
GraphError::InvalidPlanif anEventWaitreferences an event that has not yet been recorded.
Sourcepub fn validate(&self) -> GraphResult<usize>
pub fn validate(&self) -> GraphResult<usize>
Validates the plan without executing it.
Checks that:
- All
EventWaits have a precedingEventRecordwith the same ID. - No duplicate event records exist (warns; does not error).
Returns the number of validation issues found.
Auto Trait Implementations§
impl<'a> Freeze for SequentialExecutor<'a>
impl<'a> RefUnwindSafe for SequentialExecutor<'a>
impl<'a> Send for SequentialExecutor<'a>
impl<'a> Sync for SequentialExecutor<'a>
impl<'a> Unpin for SequentialExecutor<'a>
impl<'a> UnsafeUnpin for SequentialExecutor<'a>
impl<'a> UnwindSafe for SequentialExecutor<'a>
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