pub struct RequiredResource {
pub name: &'static str,
pub present: fn(&World, &Resources) -> bool,
}Expand description
A resource requirement declared by a SystemParam/System, carrying
both a human-readable name and a way to check presence dynamically
(needed because System::requires is type-erased — the concrete T
is only known where the check is constructed, inside each SystemParam
impl).
Fields§
§name: &'static str§present: fn(&World, &Resources) -> boolTrait Implementations§
Source§impl Clone for RequiredResource
impl Clone for RequiredResource
Source§fn clone(&self) -> RequiredResource
fn clone(&self) -> RequiredResource
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 RequiredResource
Auto Trait Implementations§
impl Freeze for RequiredResource
impl RefUnwindSafe for RequiredResource
impl Send for RequiredResource
impl Sync for RequiredResource
impl Unpin for RequiredResource
impl UnsafeUnpin for RequiredResource
impl UnwindSafe for RequiredResource
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