pub struct ProcessingContext<'a> { /* private fields */ }Expand description
Context for processing phase execution
Provides:
- Read access to acquisition results
- Write capabilities for processing step outputs
- Result accumulation for downstream phases
Implementations§
Source§impl<'a> ProcessingContext<'a>
impl<'a> ProcessingContext<'a>
Sourcepub fn new(acquisition_results: &'a ResultContext, output_dir: &'a Path) -> Self
pub fn new(acquisition_results: &'a ResultContext, output_dir: &'a Path) -> Self
Create a new processing context
Sourcepub fn output_dir(&self) -> &Path
pub fn output_dir(&self) -> &Path
Get the output directory
Sourcepub fn writer(&self, step_name: &str) -> Result<ResultWriter>
pub fn writer(&self, step_name: &str) -> Result<ResultWriter>
Create a result writer for a processing step
Sourcepub fn register_result(
&mut self,
step_name: impl Into<String>,
handle: ResultHandle,
)
pub fn register_result( &mut self, step_name: impl Into<String>, handle: ResultHandle, )
Register a completed step’s result handle
Sourcepub fn results(&self) -> &ResultContext
pub fn results(&self) -> &ResultContext
Get the accumulated processing results
Sourcepub fn take_results(self) -> ResultContext
pub fn take_results(self) -> ResultContext
Take ownership of the accumulated processing results
Called at the end of the processing phase.
Sourcepub fn acquisition_results(&self) -> &ResultContext
pub fn acquisition_results(&self) -> &ResultContext
Get the acquisition results context
Sourcepub fn get_rows(&self, step_name: &str) -> Result<Vec<JsonValue>>
pub fn get_rows(&self, step_name: &str) -> Result<Vec<JsonValue>>
Get all rows for an acquisition step (materializes data)
WARNING: This loads all rows into memory.
Sourcepub fn row_count(&self, step_name: &str) -> Result<usize>
pub fn row_count(&self, step_name: &str) -> Result<usize>
Get row count for an acquisition step
Sourcepub fn has_results(&self, step_name: &str) -> bool
pub fn has_results(&self, step_name: &str) -> bool
Check if acquisition step has results
Sourcepub fn is_step_empty(&self, step_name: &str) -> Result<bool>
pub fn is_step_empty(&self, step_name: &str) -> Result<bool>
Check if acquisition step is empty
Auto Trait Implementations§
impl<'a> Freeze for ProcessingContext<'a>
impl<'a> RefUnwindSafe for ProcessingContext<'a>
impl<'a> Send for ProcessingContext<'a>
impl<'a> Sync for ProcessingContext<'a>
impl<'a> Unpin for ProcessingContext<'a>
impl<'a> UnwindSafe for ProcessingContext<'a>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§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> 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>
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