Liking cljdoc? Tell your friends :D

hive-olympus.lens

Lenses zoom into one agent. A lens is (fn [Agent] -> Doc | nil): nil means it has nothing to say about that agent. observe applies every registered lens to the focused agent and reports each as a LensSection; a lens that throws or answers an invalid document is :error and never affects another.

The registry mirrors the presenter seat: an atom of id -> lens fn. Callers serialize mutations.

Lenses zoom into one agent. A lens is (fn [Agent] -> Doc | nil): nil means
it has nothing to say about that agent. `observe` applies every registered
lens to the focused agent and reports each as a LensSection; a lens that
throws or answers an invalid document is :error and never affects another.

The registry mirrors the presenter seat: an atom of id -> lens fn. Callers
serialize mutations.
raw docstring

createclj

(create)

A new, empty lens registry atom.

A new, empty lens registry atom.
sourceraw docstring

idsclj

(ids lenses)

Registered lens ids, in id order.

Registered lens ids, in id order.
sourceraw docstring

observeclj

(observe lens-map agent)

One LensSection per lens of LENS-MAP (id -> fn) applied to AGENT, in id order.

One LensSection per lens of LENS-MAP (id -> fn) applied to AGENT, in id
order.
sourceraw docstring

register!clj

(register! lenses id lens)

Register LENS under ID on LENSES. Returns ID, or nil when LENS is not a fn.

Register LENS under ID on LENSES. Returns ID, or nil when LENS is not a fn.
sourceraw docstring

statusclj

(status sections)

id -> :lens/status of SECTIONS.

id -> :lens/status of SECTIONS.
sourceraw docstring

unregister!clj

(unregister! lenses id)

Forget ID on LENSES. Returns ID, or nil when it was not registered.

Forget ID on LENSES. Returns ID, or nil when it was not registered.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close