Function streemap::slice[][src]

pub fn slice<N, T, S, R>(
    rect: Rect<N>,
    items: &mut [T],
    f_item_size: S,
    f_item_set_rect: R
) where
    N: NumAssignOps + NumOps + PartialOrd + Zero + One + Copy + Sum,
    S: Fn(&T) -> N,
    R: FnMut(&mut T, Rect<N>), 

Distribute items inside rect vertically.

  • f_item_size provide the size of an item
  • f_item_set_rect receive the item distributed Rect. Called once for each item and in a stable order.

Complexity: O(2⨯items.len())