pub fn sort_by_key<T, F: FnMut(&T) -> K, K: Ord>(v: &mut [T], f: F)
See slice::sort_by_key.
slice::sort_by_key