pub struct Threads(pub NonZero<usize>);Expand description
How many threads a run’s parallel work may use; one is the serial run.
Tuple Fields§
§0: NonZero<usize>Implementations§
Trait Implementations§
impl Copy for Threads
impl Eq for Threads
Source§impl Resource for Threads
impl Resource for Threads
const NAME: &'static str = "core.threads"
const VERSION: u32 = 1
Source§fn verify(&self, _w: &World) -> Result<(), String>
fn verify(&self, _w: &World) -> Result<(), String>
The resource’s own invariants in
w; as Component::verify, run by the pass manager’s verifier.Source§fn references(&self, _out: &mut Vec<Entity>)
fn references(&self, _out: &mut Vec<Entity>)
The entities this resource refers to, appended to
out. A resource holding entity references must declare
every one of them and implement Resource::retain_references.Source§fn retain_references(&mut self, _keep: &dyn Fn(Entity) -> bool)
fn retain_references(&mut self, _keep: &dyn Fn(Entity) -> bool)
Forget every reference to an entity
keep refuses (set it to “none”). The world calls it whenever entities
leave it (World::despawn, World::retain, World::move_components) and on the copy a
World::subset or World::split_off part gets, so a resource never refers to an entity its world lacks.Source§impl RunSetting for Threads
impl RunSetting for Threads
impl StructuralPartialEq for Threads
Auto Trait Implementations§
impl Forget for Threads
impl Freeze for Threads
impl RefUnwindSafe for Threads
impl Send for Threads
impl Sync for Threads
impl Unpin for Threads
impl UnsafeUnpin for Threads
impl UnwindSafe for Threads
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
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.