alloy::core::hint

Function fixed_size

source
pub const unsafe fn fixed_size<T>(slice: &[T], length: usize)
Expand description

A marker intrinsic that tells the compiler that the slice will have a fixed size of N.

§Parameters

  • slice - The slice to check.
  • length - The expected length of the slice.

§Safety

The size of the slice must be equal to N.