pub struct ProcessFileContext {
pub pipeline_id: PipelineId,
pub security_context: SecurityContext,
pub user_worker_override: Option<usize>,
pub channel_depth_override: Option<usize>,
pub observer: Option<Arc<dyn ProcessingObserver>>,
}Expand description
Configuration for processing a file through a pipeline
Groups related parameters to avoid excessive function arguments.
This context is passed to PipelineService::process_file.
Fields§
§pipeline_id: PipelineIdPipeline identifier
security_context: SecurityContextSecurity context for processing
user_worker_override: Option<usize>Optional override for number of worker threads
channel_depth_override: Option<usize>Optional override for channel depth
observer: Option<Arc<dyn ProcessingObserver>>Optional observer for progress tracking
Implementations§
Source§impl ProcessFileContext
impl ProcessFileContext
Sourcepub fn new(pipeline_id: PipelineId, security_context: SecurityContext) -> Self
pub fn new(pipeline_id: PipelineId, security_context: SecurityContext) -> Self
Creates a new process file context with the given pipeline ID and security context
Sourcepub fn with_workers(self, workers: usize) -> Self
pub fn with_workers(self, workers: usize) -> Self
Sets the worker count override
Sourcepub fn with_channel_depth(self, depth: usize) -> Self
pub fn with_channel_depth(self, depth: usize) -> Self
Sets the channel depth override
Sourcepub fn with_observer(self, observer: Arc<dyn ProcessingObserver>) -> Self
pub fn with_observer(self, observer: Arc<dyn ProcessingObserver>) -> Self
Sets the progress observer
Trait Implementations§
Source§impl Clone for ProcessFileContext
impl Clone for ProcessFileContext
Source§fn clone(&self) -> ProcessFileContext
fn clone(&self) -> ProcessFileContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ProcessFileContext
impl !RefUnwindSafe for ProcessFileContext
impl Send for ProcessFileContext
impl Sync for ProcessFileContext
impl Unpin for ProcessFileContext
impl !UnwindSafe for ProcessFileContext
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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