Skip to main content

pack

Function pack 

Source
pub fn pack<A, EF>(cells: &[A]) -> Vec<EF>
where A: Coordinates, EF: Coordinates,
Expand description

Read a run of cells as the wide elements holding the same coordinates.

One copy at the wide alignment, and no arithmetic. Reusing the source buffer is unsound.

§Panics

Panics unless the run’s coordinates fill a whole number of wide elements.