pub fn elements_as_bytes<T: RasterElement>(values: &[T]) -> &[u8] ⓘExpand description
Reinterprets typed samples as their native-endian bytes.
Zero-copy: the returned slice borrows values. Useful when handing a typed
array to a writer that speaks raw bytes.
§Examples
use oxigeo_core::buffer::elements_as_bytes;
let values = [1u16, 2u16];
assert_eq!(elements_as_bytes(&values).len(), 4);