pub struct Answer {
pub cold: Option<bool>,
pub completions: Option<Vec<Completion>>,
pub diagnostics: Option<Vec<Diagnostic>>,
pub hover: Option<String>,
pub lang: Option<String>,
pub locations: Option<Vec<Location>>,
pub op: Option<String>,
pub path: Option<String>,
pub repo: Option<String>,
pub rev: Option<String>,
pub symbols: Option<Vec<Symbol>>,
}Fields§
§cold: Option<bool>Cold reports that this request paid to PREPARE the revision — the tree write, the dependency fetch and the language server’s first index. It is the billed event, surfaced so a caller can see what it was charged for.
completions: Option<Vec<Completion>>Completions is complete’s answer: the candidates at the position, typed and resolved through the repository’s dependencies rather than guessed from text.
diagnostics: Option<Vec<Diagnostic>>Diagnostics is diagnostics’ answer: every problem the server finds in the whole file, position ignored. Empty means it found none.
hover: Option<String>Hover is hover’s answer: the type and documentation as the language server itself renders them, so it is prose meant to be shown, not parsed.
lang: Option<String>Lang is the language the server that answered speaks ("go"), as the daemon reports it. Empty when the daemon named none.
locations: Option<Vec<Location>>Locations is locate’s answer: where the symbol is defined, referenced, typed or implemented, per the relation asked for. Empty means the server resolved nothing there, which is an answer.
op: Option<String>Op is the question that was asked: hover, locate, symbols, diagnostics or complete. It names which result field below is the populated one.
path: Option<String>Path is the repo-relative file the question was about, echoed back.
repo: Option<String>Repo is the repository the question was about, echoed back.
rev: Option<String>Rev is the RESOLVED commit sha, never the branch or tag that was asked for. It is what makes an answer re-askable: a branch moves, this does not.
symbols: Option<Vec<Symbol>>Symbols is symbols’ answer: the file’s whole outline, position ignored.