Skip to main content

binary_search_preferred

Function binary_search_preferred 

Source
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.