pub struct ExecutionContextBuilder { /* private fields */ }Expand description
Declarative construction of an ExecutionContext.
Implementations§
Source§impl ExecutionContextBuilder
impl ExecutionContextBuilder
Sourcepub const fn memory_budget(self, budget: MemoryBudget) -> Self
pub const fn memory_budget(self, budget: MemoryBudget) -> Self
Replaces the automatic execution budget (a share of physical memory, or
MOLFRAME_MEMORY_BUDGET; see MemoryBudget::auto).
Sourcepub fn cancellation(self, token: CancellationToken) -> Self
pub fn cancellation(self, token: CancellationToken) -> Self
Uses an existing cancellation domain.
Sourcepub const fn scratch_policy(self, policy: ScratchPolicy) -> Self
pub const fn scratch_policy(self, policy: ScratchPolicy) -> Self
Replaces the reusable scratch policy.
Sourcepub fn temp_storage_policy(self, policy: TempStoragePolicy) -> Self
pub fn temp_storage_policy(self, policy: TempStoragePolicy) -> Self
Replaces the temporary-storage policy.
Sourcepub const fn worker_budget(self, workers: usize) -> Self
pub const fn worker_budget(self, workers: usize) -> Self
Caps native tasks submitted by one operation to the shared worker pool.
Sourcepub const fn image_search_limit(self, images: usize) -> Self
pub const fn image_search_limit(self, images: usize) -> Self
Replaces the default ceiling on candidate symmetry images a crystal search may examine.
Sourcepub fn build(self) -> Result<ExecutionContext, ContextError>
pub fn build(self) -> Result<ExecutionContext, ContextError>
Validates policy relationships and constructs the context.
§Errors
Returns ContextError if reusable scratch could exceed the complete
execution-memory budget or spill is configured with no disk capacity.
Trait Implementations§
Source§impl Clone for ExecutionContextBuilder
impl Clone for ExecutionContextBuilder
Source§impl Debug for ExecutionContextBuilder
impl Debug for ExecutionContextBuilder
Auto Trait Implementations§
impl Freeze for ExecutionContextBuilder
impl RefUnwindSafe for ExecutionContextBuilder
impl Send for ExecutionContextBuilder
impl Sync for ExecutionContextBuilder
impl Unpin for ExecutionContextBuilder
impl UnsafeUnpin for ExecutionContextBuilder
impl UnwindSafe for ExecutionContextBuilder
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