pub struct ArrayType {
pub element_ty: Box<Type>,
pub nelement: Option<u32>,
pub stride: Option<usize>,
}
Fields§
§element_ty: Box<Type>
Type of the array element.
nelement: Option<u32>
Number of elements in the array. None if the array length is only known at runtime.
stride: Option<usize>
Stride between elements in the array. None if the array doesn’t have a explicitly specified layout. For example, an array of descriptor resources doesn’t have a physical layout.
Trait Implementations§
source§impl PartialEq for ArrayType
impl PartialEq for ArrayType
source§impl SpirvType for ArrayType
impl SpirvType for ArrayType
source§fn min_nbyte(&self) -> Option<usize>
fn min_nbyte(&self) -> Option<usize>
Minimum size of the type in bytes if it can be represented in-memory.
It’s the size of all static members and plus one element if it’s an array.
Same as
wgpu::BindingType::Buffer::min_binding_size
.source§fn nbyte(&self) -> Option<usize>
fn nbyte(&self) -> Option<usize>
Size of the type in bytes if it can be represented in-memory.
source§fn member_offset(&self, member_index: usize) -> Option<usize>
fn member_offset(&self, member_index: usize) -> Option<usize>
Returns the offset of the i-th member in bytes if it’s a composite type.
source§fn access_ty(&self) -> Option<AccessType>
fn access_ty(&self) -> Option<AccessType>
Returns how the type can be accessed:
ReadOnly
, WriteOnly
or
ReadWrite
.impl Eq for ArrayType
impl StructuralPartialEq for ArrayType
Auto Trait Implementations§
impl Freeze for ArrayType
impl RefUnwindSafe for ArrayType
impl Send for ArrayType
impl Sync for ArrayType
impl Unpin for ArrayType
impl UnwindSafe for ArrayType
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)