CompleteResult

Result of completion/complete.

Members

Static functions

fromJson
CompleteResult fromJson(Json j)

Parse a completion/complete result envelope (`{completion: {values, total?, hasMore?}}`) as returned by a server.

prefixMatch
CompleteResult prefixMatch(const(string)[] candidates, string prefix)

Build a CompleteResult by case-insensitively prefix-matching prefix against candidates. The matches populate values, total is set to the match count, and hasMore reflects whether the spec's 100-item cap truncated the set. This is the built-in helper for the common autocompletion pattern, so consumers do not hand-roll startsWith.

Variables

maxValues
enum size_t maxValues;

The spec hard-caps completion.values at 100 items (schema @maxItems 100: "Must not exceed 100 items.").

Mixed In Members

From mixin MetaField

meta
Json meta;

optional _meta object