pub enum WorkerPolicy {
Auto,
Single,
Threads(usize),
}Expand description
Worker policy for CPU-heavy lockbox work.
Browser-style WASM builds should treat Auto as single-threaded unless the
embedding explicitly provides a threaded worker implementation. Native
callers can use Threads to bound CPU and memory use, or Single for
deterministic low-overhead operation.
Variants§
Auto
Use the platform default. Native builds use available parallelism capped at a conservative default; browser/WASM builds use one worker.
Single
Disable worker threads.
Threads(usize)
Use at most this many workers. A value below one is normalized to one.
Trait Implementations§
Source§impl Clone for WorkerPolicy
impl Clone for WorkerPolicy
Source§fn clone(&self) -> WorkerPolicy
fn clone(&self) -> WorkerPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WorkerPolicy
Source§impl Debug for WorkerPolicy
impl Debug for WorkerPolicy
impl Eq for WorkerPolicy
Source§impl PartialEq for WorkerPolicy
impl PartialEq for WorkerPolicy
impl StructuralPartialEq for WorkerPolicy
Auto Trait Implementations§
impl Freeze for WorkerPolicy
impl RefUnwindSafe for WorkerPolicy
impl Send for WorkerPolicy
impl Sync for WorkerPolicy
impl Unpin for WorkerPolicy
impl UnsafeUnpin for WorkerPolicy
impl UnwindSafe for WorkerPolicy
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