Function rerun::external::re_renderer::external::re_video::demux::latest_at_idx

source ·
pub fn latest_at_idx<T, K>(
    v: &[T],
    key: impl Fn(&T) -> K,
    needle: &K
) -> Option<usize>
where K: Ord,
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