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
inv
, if it exists - The index of the first element in
v
that is lesser thanneedle
, if it exists None
, ifv
is empty ORneedle
is greater than all elements inv