pub fn code_lenses(
uri: &Uri,
doc: &ParsedDoc,
store: &DocumentStore,
imports: &HashMap<String, String>,
cancel_rev: Option<u64>,
should_cancel: impl Fn() -> bool,
) -> Vec<CodeLens>Expand description
Build all code lenses for uri/doc, answering counts from the store’s
mir-backed indexes.
cancel_rev is threaded into mir’s index queries so a concurrent edit
aborts them at phase boundaries. should_cancel is polled between
top-level declarations; when it returns true the function returns an
empty Vec immediately. Pass || false for requests that do not need
cooperative cancellation.