pub enum Access {
ResRead(TypeId),
ResWrite(TypeId),
CompRead(TypeId),
CompWrite(TypeId),
}Expand description
Describes what a system parameter accesses — used for conflict detection.
Variants§
ResRead(TypeId)
Shared read of a resource.
ResWrite(TypeId)
Exclusive write of a resource.
CompRead(TypeId)
Shared read of a component type.
CompWrite(TypeId)
Exclusive write of a component type.
Implementations§
Source§impl Access
impl Access
Sourcepub fn conflicts_with(&self, other: &Access) -> bool
pub fn conflicts_with(&self, other: &Access) -> bool
Returns true if self and other cannot safely coexist in the same
system execution.
Conflict rules:
- Read + Write (same TypeId, same namespace) → conflict
- Write + Write (same TypeId, same namespace) → conflict
- Read + Read → no conflict
- Cross-namespace (Res vs Comp) → no conflict
Trait Implementations§
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
Mutably borrows from an owned value. Read more