pub struct OperationOptions { /* private fields */ }Expand description
Options for one synchronous native operation.
Memory admission counts requested native storage capacity growth in the operation’s fallible reservations, plus explicitly scoped scratch buffers. It excludes pre-existing immutable inputs, allocator overhead and memory internal to third-party libraries. Retained reservation charges accumulate conservatively for the call; scoped scratch is released when no longer needed. This is a storage budget, not a process RSS limit.
Work admission counts the actual defined operations described by the producer (such as sampled observations, layout rounds, replay commands and raster/encoding work). Neither budget changes the scientific or visual algorithm. Existing device limits still apply without either added budget.
Implementations§
Source§impl OperationOptions
impl OperationOptions
Sourcepub fn cancellation(
self,
token: impl Into<Option<CancelToken>>,
) -> OperationOptions
pub fn cancellation( self, token: impl Into<Option<CancelToken>>, ) -> OperationOptions
Request cancellation using the supplied shared token.
Sourcepub fn memory_limit_bytes(
self,
bytes: impl Into<Option<u64>>,
) -> OperationOptions
pub fn memory_limit_bytes( self, bytes: impl Into<Option<u64>>, ) -> OperationOptions
Limit the operation’s admitted native storage, in bytes.
Sourcepub fn work_limit(self, units: impl Into<Option<u64>>) -> OperationOptions
pub fn work_limit(self, units: impl Into<Option<u64>>) -> OperationOptions
Limit the operation’s defined work units.
Sourcepub fn get_cancellation(&self) -> Option<&CancelToken>
pub fn get_cancellation(&self) -> Option<&CancelToken>
Borrow the configured cancellation token.
Sourcepub const fn get_memory_limit_bytes(&self) -> Option<u64>
pub const fn get_memory_limit_bytes(&self) -> Option<u64>
Configured storage budget.
Sourcepub const fn get_work_limit(&self) -> Option<u64>
pub const fn get_work_limit(&self) -> Option<u64>
Configured work budget.
Trait Implementations§
Source§impl Clone for OperationOptions
impl Clone for OperationOptions
Source§fn clone(&self) -> OperationOptions
fn clone(&self) -> OperationOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OperationOptions
impl Debug for OperationOptions
Source§impl Default for OperationOptions
impl Default for OperationOptions
Source§fn default() -> OperationOptions
fn default() -> OperationOptions
Auto Trait Implementations§
impl !RefUnwindSafe for OperationOptions
impl !UnwindSafe for OperationOptions
impl Forget for OperationOptions
impl Freeze for OperationOptions
impl Move for OperationOptions
impl Send for OperationOptions
impl Sync for OperationOptions
impl Unpin for OperationOptions
impl UnsafeUnpin for OperationOptionswhere
*const ArcInner<Atomic<bool>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<bool>>>: UnsafeUnpin,
*const ArcInner<dyn Fn(OperationPhase) -> Result<(), Error> + Send + Sync> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Fn(OperationPhase) -> Result<(), Error> + Send + Sync>>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.