pub fn binary_search_preferred(
records: &[IndexRecord],
entry_key: &[u8; 32],
preferences: &[u16],
) -> Option<usize>Expand description
Search for the best-matching record given a list of preferred discriminators. Tries each discriminator in order; returns the first hit. Falls back to discriminator 0 if none of the preferences match.