pub enum Executor {
Sequential(SequentialExecutor),
Tokio(TokioExecutor),
Rayon(RayonExecutor),
}Expand description
Unified executor enum combining all concurrency strategies.
Wraps different executor implementations in a single enum for type-safe usage. Automatically routes to appropriate implementation based on configuration.
Variants§
Sequential(SequentialExecutor)
Sequential executor (always available).
Tokio(TokioExecutor)
Tokio async executor (always available).
Rayon(RayonExecutor)
Rayon parallel executor (requires parallel feature).
Implementations§
Source§impl Executor
impl Executor
Sourcepub fn sequential() -> Self
pub fn sequential() -> Self
Create Sequential executor.
Sourcepub fn rayon(num_threads: Option<usize>) -> Result<Self, ExecutionError>
pub fn rayon(num_threads: Option<usize>) -> Result<Self, ExecutionError>
Create Rayon executor with optional thread count (requires parallel feature).
Sourcepub async fn execute_batch<F, T>(
&self,
items: Vec<T>,
op: F,
) -> Result<Vec<Result<(), ExecutionError>>, ExecutionError>
pub async fn execute_batch<F, T>( &self, items: Vec<T>, op: F, ) -> Result<Vec<Result<(), ExecutionError>>, ExecutionError>
Execute operation on batch of items concurrently.
Returns vector of results in same order as input items. Individual item failures don’t stop processing of other items.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Executor
impl !RefUnwindSafe for Executor
impl Send for Executor
impl Sync for Executor
impl Unpin for Executor
impl UnsafeUnpin for Executor
impl !UnwindSafe for Executor
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> 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