pub struct BoundedExecutor { /* private fields */ }Implementations§
Source§impl BoundedExecutor
impl BoundedExecutor
pub fn new(max_parallelism: NonZeroUsize) -> Self
pub fn with_pool( max_parallelism: NonZeroUsize, pool: SharedExecutorPool, ) -> Self
pub fn max_parallelism(&self) -> usize
pub fn is_degraded(&self) -> bool
pub fn pool_error(&self) -> Option<&SharedExecutorPoolError>
Sourcepub fn map_ordered<T, R, F>(self, inputs: &[T], operation: F) -> Vec<R>
pub fn map_ordered<T, R, F>(self, inputs: &[T], operation: F) -> Vec<R>
Materializes one output per input in input order, regardless of completion
order. An output that is itself a Result does not short-circuit workers.
This bounds worker concurrency, not the collected vector’s memory.
Sourcepub fn map_ordered_with_context<T, R, F>(
self,
inputs: &[T],
context: &RuntimeTaskContext,
operation: F,
) -> Result<Vec<R>, RuntimeCancellationReason>
pub fn map_ordered_with_context<T, R, F>( self, inputs: &[T], context: &RuntimeTaskContext, operation: F, ) -> Result<Vec<R>, RuntimeCancellationReason>
The materializing map with cooperative cancellation checks. In-flight callbacks may finish after cancellation; no partial vector is returned.
Trait Implementations§
Source§impl Clone for BoundedExecutor
impl Clone for BoundedExecutor
Source§impl Debug for BoundedExecutor
impl Debug for BoundedExecutor
Auto Trait Implementations§
impl !RefUnwindSafe for BoundedExecutor
impl !UnwindSafe for BoundedExecutor
impl Freeze for BoundedExecutor
impl Send for BoundedExecutor
impl Sync for BoundedExecutor
impl Unpin for BoundedExecutor
impl UnsafeUnpin for BoundedExecutor
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