pub fn complete(
source: &str,
cursor: usize,
aliases: &QueryAliases,
values: Option<&dyn StructureValues>,
) -> CompletionResultExpand description
Computes completion using a UTF-8 byte cursor.
cursor is a byte offset, not a character index. A cursor in the middle
of a UTF-8 scalar is rejected rather than silently moving to a different
replacement range. The returned range always points into source.
After a value column such as chain, resname, or name, candidates
come exclusively from values when it is supplied; language keywords are
never mixed with structure identifiers. $ references are completed
exclusively from aliases. At a fresh token after a finished term, no
candidates are offered until the caller types a character.