pub struct Access { /* private fields */ }Expand description
A system’s declared data access.
Implementations§
Source§impl Access
impl Access
Sourcepub fn reads_components(self, components: ComponentMask) -> Access
pub fn reads_components(self, components: ComponentMask) -> Access
Declare the components step reads.
Sourcepub fn writes_components(self, components: ComponentMask) -> Access
pub fn writes_components(self, components: ComponentMask) -> Access
Declare the components step writes.
Sourcepub fn reads_resources(self, resources: ComponentMask) -> Access
pub fn reads_resources(self, resources: ComponentMask) -> Access
Declare the resources step reads.
Sourcepub fn writes_resources(self, resources: ComponentMask) -> Access
pub fn writes_resources(self, resources: ComponentMask) -> Access
Declare the resources step writes.
Sourcepub fn exclusive(self) -> Access
pub fn exclusive(self) -> Access
Mark the system as exclusive: it conflicts with every other system and so never runs concurrently. Used for a system that touches non-shareable state the access masks do not model (e.g. a main-thread-only backend).
Sourcepub fn is_exclusive(self) -> bool
pub fn is_exclusive(self) -> bool
Whether the system was marked exclusive.
Sourcepub fn union(self, other: Access) -> Access
pub fn union(self, other: Access) -> Access
The combined access of two declarations: reads, writes, and exclusivity union. Used to fold a data-dependent system’s per-program accesses into its schedule-visible declaration.
Sourcepub fn may_read_component(self, id: ComponentId) -> bool
pub fn may_read_component(self, id: ComponentId) -> bool
Whether a read of this component id is within the declaration (a declared write implies read permission; exclusive allows everything).
Sourcepub fn may_write_component(self, id: ComponentId) -> bool
pub fn may_write_component(self, id: ComponentId) -> bool
Whether a write of this component id is within the declaration.
Sourcepub fn may_read_resource(self, id: ComponentId) -> bool
pub fn may_read_resource(self, id: ComponentId) -> bool
Whether a read of this resource id is within the declaration (a declared write implies read permission).
Sourcepub fn may_write_resource(self, id: ComponentId) -> bool
pub fn may_write_resource(self, id: ComponentId) -> bool
Whether a write of this resource id is within the declaration.
Sourcepub fn conflicts_with(self, other: Access) -> bool
pub fn conflicts_with(self, other: Access) -> bool
Whether this system can run concurrently with other.
Trait Implementations§
impl Copy for Access
impl Eq for Access
impl StructuralPartialEq for Access
Auto Trait Implementations§
impl Freeze for Access
impl RefUnwindSafe for Access
impl Send for Access
impl Sync for Access
impl Unpin for Access
impl UnsafeUnpin for Access
impl UnwindSafe for Access
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.