pub struct LinearExecutor { /* private fields */ }Expand description
Linear executor that runs cells sequentially in dependency order.
Implementations§
Source§impl LinearExecutor
impl LinearExecutor
Sourcepub fn with_state(state: StateManager) -> Self
pub fn with_state(state: StateManager) -> Self
Create with an existing state manager.
Sourcepub fn set_callback(&mut self, callback: impl ExecutionCallback + 'static)
pub fn set_callback(&mut self, callback: impl ExecutionCallback + 'static)
Set the execution callback for progress reporting.
Sourcepub fn set_abort_handle(&mut self, handle: AbortHandle)
pub fn set_abort_handle(&mut self, handle: AbortHandle)
Set the abort handle for cooperative cancellation.
Sourcepub fn abort_handle(&self) -> Option<&AbortHandle>
pub fn abort_handle(&self) -> Option<&AbortHandle>
Get the current abort handle.
Sourcepub fn load_cell(
&mut self,
compiled: CompiledCell,
dep_count: usize,
) -> Result<()>
pub fn load_cell( &mut self, compiled: CompiledCell, dep_count: usize, ) -> Result<()>
Load a compiled cell for execution.
Sourcepub fn unload_cell(&mut self, cell_id: CellId) -> Option<LoadedCell>
pub fn unload_cell(&mut self, cell_id: CellId) -> Option<LoadedCell>
Unload a cell (e.g., before hot-reload).
Sourcepub fn restore_cell(&mut self, cell: LoadedCell)
pub fn restore_cell(&mut self, cell: LoadedCell)
Restore a previously unloaded cell (for hot-reload rollback).
Sourcepub fn execute_cell(
&mut self,
cell_id: CellId,
inputs: &[Arc<BoxedOutput>],
) -> Result<BoxedOutput>
pub fn execute_cell( &mut self, cell_id: CellId, inputs: &[Arc<BoxedOutput>], ) -> Result<BoxedOutput>
Execute a single cell with the given inputs.
Returns the serialized output on success.
Returns Error::Aborted if abort was requested before execution.
Sourcepub fn execute_and_store(
&mut self,
cell_id: CellId,
inputs: &[Arc<BoxedOutput>],
) -> Result<()>
pub fn execute_and_store( &mut self, cell_id: CellId, inputs: &[Arc<BoxedOutput>], ) -> Result<()>
Execute a cell and store the output in the state manager.
Sourcepub fn execute_in_order(
&mut self,
order: &[CellId],
deps: &HashMap<CellId, Vec<CellId>>,
) -> Result<()>
pub fn execute_in_order( &mut self, order: &[CellId], deps: &HashMap<CellId, Vec<CellId>>, ) -> Result<()>
Execute cells in the given order, resolving dependencies from state.
Returns Error::Aborted if abort was requested during execution.
Sourcepub fn state(&self) -> &StateManager
pub fn state(&self) -> &StateManager
Get a reference to the state manager.
Sourcepub fn state_mut(&mut self) -> &mut StateManager
pub fn state_mut(&mut self) -> &mut StateManager
Get a mutable reference to the state manager.
Auto Trait Implementations§
impl Freeze for LinearExecutor
impl !RefUnwindSafe for LinearExecutor
impl Send for LinearExecutor
impl Sync for LinearExecutor
impl Unpin for LinearExecutor
impl !UnwindSafe for LinearExecutor
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.