Function re_video::demux::latest_at_idx

source ·
pub fn latest_at_idx<T, K: Ord>(
    v: &[T],
    key: impl Fn(&T) -> K,
    needle: &K
) -> Option<usize>
Expand description

Returns the index of:

  • The index of needle in v, if it exists
  • The index of the first element in v that is lesser than needle, if it exists
  • None, if v is empty OR needle is greater than all elements in v