pub trait Request: 'static {
type Read: Query;
type Write: QueryMut;
type ResRead: ResQuery;
type ResWrite: ResQueryMut;
type EntWrite: EntQueryMut;
}Expand description
A system request for a components, resources, and entity containers.
All systems must declare their own requests in advance. The crate exploits the information to avoid data race and dead-lock between systems. A request consists of read and write requests like so,
- Read - Read request for a set of components.
- Write - Write request for a set of components.
- ResRead - Read request for a set of resources.
- ResWrite - Write request for a set of resources.
- EntWrite - Write request for a set of entity containers.
Required Associated Types§
type Read: Query
type Write: QueryMut
type ResRead: ResQuery
type ResWrite: ResQueryMut
type EntWrite: EntQueryMut
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<R, W, RR, RW, EW> Request for (R, W, RR, RW, EW)where
R: Query,
W: QueryMut,
RR: ResQuery,
RW: ResQueryMut,
EW: EntQueryMut,
Blanket implementation of Request for tuples of queries.
impl<R, W, RR, RW, EW> Request for (R, W, RR, RW, EW)where
R: Query,
W: QueryMut,
RR: ResQuery,
RW: ResQueryMut,
EW: EntQueryMut,
Blanket implementation of Request for tuples of queries.