pub struct ParallelSafe;Expand description
Parallel-safe execution (default).
Use this when your mechanic:
- Only reads/writes to the entity it’s processing
- Has no dependencies on other mechanics’ execution order
- Can safely run concurrently with other mechanics
§Examples
ⓘ
impl Mechanic for SimpleDamageMechanic {
type Execution = ParallelSafe; // Can run in parallel
// ...
}Most mechanics should use this as it allows maximum parallelism.
Trait Implementations§
Source§impl ExecutionHint for ParallelSafe
impl ExecutionHint for ParallelSafe
Auto Trait Implementations§
impl Freeze for ParallelSafe
impl RefUnwindSafe for ParallelSafe
impl Send for ParallelSafe
impl Sync for ParallelSafe
impl Unpin for ParallelSafe
impl UnsafeUnpin for ParallelSafe
impl UnwindSafe for ParallelSafe
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