Skip to main content

ExecutionContext

Struct ExecutionContext 

Source
pub struct ExecutionContext { /* private fields */ }
Expand description

Shared controls passed through every stage of an out-of-core operation.

Implementations§

Source§

impl ExecutionContext

Source

pub fn builder() -> ExecutionContextBuilder

Starts a declarative context builder with bounded defaults.

Source

pub const fn image_search_limit(&self) -> usize

The most candidate symmetry images a crystal search may examine.

A crystal environment is found by trying every symmetry operation and lattice translation that could bring a copy within reach, so the work grows with the unit’s extent as well as its atom count. Exceeding the limit is an error, never a silent truncation; raise it deliberately after reviewing the cost.

Source

pub fn memory_budget(&self) -> MemoryBudget

Returns this context’s execution-memory ceiling.

Source

pub const fn worker_budget(&self) -> usize

Maximum native tasks one operation may submit to the shared pool.

Source

pub const fn cancellation(&self) -> &CancellationToken

Returns the shared cooperative cancellation token.

Source

pub const fn scratch_policy(&self) -> ScratchPolicy

Returns the reusable scratch policy.

Source

pub const fn temp_storage_policy(&self) -> &TempStoragePolicy

Returns the temporary-storage policy.

Source

pub fn create_spill_file(&self, key: &str) -> Result<SpillFile, SpillError>

Creates one bounded, execution-owned spill file.

The key becomes the deterministic file name below the configured root. A file with the same key is never overwritten.

§Errors

Returns SpillError::Disabled when spill is not configured, or a storage error when the key, disk budget, or destination is invalid.

Source

pub fn spill_bytes(&self) -> u64

Returns temporary bytes currently retained by this execution graph.

Source

pub fn total_spilled_bytes(&self) -> u64

Total physical bytes written to execution-owned spill files.

Source

pub fn reserved_bytes(&self) -> usize

Bytes currently retained by execution-owned allocations.

Source

pub fn peak_reserved_bytes(&self) -> usize

Highest number of execution-owned bytes retained concurrently.

Source

pub fn live_batches(&self) -> usize

Batch leases that are currently alive.

Source

pub fn peak_live_batches(&self) -> usize

Highest number of batch leases alive concurrently.

Source

pub fn try_reserve( &self, bytes: usize, ) -> Result<MemoryReservation, MemoryBudgetError>

Charges retained bytes against this context until the result is dropped.

§Errors

Returns MemoryBudgetError::Exhausted when the requested bytes do not fit alongside current reservations.

Trait Implementations§

Source§

impl Clone for ExecutionContext

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExecutionContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ExecutionContext

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.