Skip to main content

complete

Function complete 

Source
pub fn complete(prefix: &str, vocab: &Vocab) -> Completion
Expand description

What may follow prefix — the query text from its start to the caret — in a plane whose vocabulary is vocab.

Never fails and never parses: a prefix is not a statement, and asking whether it is one would answer the wrong question. Reads only what is before the caret, which is what an editor can hand over cheaply whenever typing pauses.