pub(super) enum SubAccess {
Offset(u32),
Index {
value: Handle<Expression>,
stride: u32,
},
}
Expand description
One step in accessing a Storage
global’s component or element.
Writer::temp_access_chain
holds a series of these structures,
describing how to compute the byte offset of a particular element
or member of some global variable in the Storage
address
space.
Variants§
Offset(u32)
Add the given byte offset. This is used for struct members, or known components of a vector or matrix. In all those cases, the byte offset is a compile-time constant.
Index
Scale value
by stride
, and add that to the current byte
offset. This is used to compute the offset of an array element
whose index is computed at runtime.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SubAccess
impl RefUnwindSafe for SubAccess
impl Send for SubAccess
impl Sync for SubAccess
impl Unpin for SubAccess
impl UnwindSafe for SubAccess
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