Struct spirv_std::RuntimeArray[][src]

pub struct RuntimeArray<T> { /* fields omitted */ }
Expand description

Dynamically-sized arrays in Rust carry around their length as the second half of a tuple. Unfortunately, sometimes SPIR-V provides an unsized array with no way of obtaining its length. Hence, this type represents something very similar to a slice, but with no way of knowing its length.

Implementations

Index the array. Unfortunately, because the length of the runtime array cannot be known, this function will happily index outside of the bounds of the array, and so is unsafe.

Safety

Bounds checking is not performed, and indexing outside the bounds of the array can happen, and lead to UB.

Index the array, returning a mutable reference to an element. Unfortunately, because the length of the runtime array cannot be known, this function will happily index outside of the bounds of the array, and so is unsafe.

Safety

Bounds checking is not performed, and indexing outside the bounds of the array can happen, and lead to UB.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.