Function: cider-xref-tree--implements

cider-xref-tree--implements is a byte-compiled function defined in cider-xref-tree.el.

Signature

(cider-xref-tree--implements VAR)

Documentation

Classify VAR and list its implementations via a tooling eval.

Return a cons of the kind ("protocol"/"multimethod"/"other") and the list of implementation strings, or nil when the eval yields nothing.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-xref-tree.el
(defun cider-xref-tree--implements (var)
  "Classify VAR and list its implementations via a tooling eval.
Return a cons of the kind (\"protocol\"/\"multimethod\"/\"other\") and the list
of implementation strings, or nil when the eval yields nothing."
  (when-let* ((result (cider-sync-tooling-eval
                       (format cider-xref-tree--implements-code var)
                       (cider-current-ns)))
              (value (nrepl-dict-get result "value"))
              (vec (ignore-errors (parseedn-read-str value))))
    (when (and (vectorp vec) (> (length vec) 0))
      (let ((items (append vec nil)))
        (cons (car items) (cdr items))))))