Skip to main content

K_VOCABULARY_SAMPLE_ELEMENTS

Constant K_VOCABULARY_SAMPLE_ELEMENTS 

Source
pub const K_VOCABULARY_SAMPLE_ELEMENTS: usize = 64;
Expand description

Elements sampled when the surface builds the key vocabulary for a SUGGESTION.

GAP-SG-202: this bounds the suggestion only, never the resolution. Deciding whether a requested key exists scans every element, because the scan is a pointer walk per element with no allocation and a wrong absent verdict would refuse a legitimate request. Listing the alternatives is the expensive half — it collects names — and it only runs once a key has already failed, so a sample is enough to name a near miss.