Liking cljdoc? Tell your friends :D

s-exp.hako.ext

Extension registry: records, sorted-collection helpers, user tags.

Extension registry: records, sorted-collection helpers, user tags.
raw docstring

default-comparator?clj

(default-comparator? sorted-coll)

True when sorted-coll uses the natural-ordering comparator that sorted-set / sorted-map install by default.

True when `sorted-coll` uses the natural-ordering comparator that
`sorted-set` / `sorted-map` install by default.
raw docstring

record-info-by-classclj

(record-info-by-class klass)

record-info-by-nameclj

(record-info-by-name classname)

register-record!clj

(register-record! klass)

Register a Clojure defrecord OR Java record class so hako can encode and decode its instances.

Reflects on the class once, caches a MethodHandle for the canonical constructor (and per-field accessor MHs for Java records), and hands the resulting RecordInfo to the Java-side registry.

Register a Clojure defrecord OR Java record class so hako can encode
and decode its instances.

Reflects on the class once, caches a MethodHandle for the canonical
constructor (and per-field accessor MHs for Java records), and hands
the resulting RecordInfo to the Java-side registry.
raw docstring

register-user-tag!clj

(register-user-tag! id klass write-fn read-fn)

Register a user extension tag id for klass. See ns docstring for callback signatures.

id is a small non-negative integer (0..0x0FFFFFFF) that hako shifts into the private wire range (0x10000000+). Callers pick 1, 2, 3... per application; the shift is a compile-time add with no per-encode cost. The full wire id (returned) can be passed to register-user-tag-raw! for cross-app registrations.

Register a user extension tag `id` for `klass`. See ns docstring for
callback signatures.

`id` is a small non-negative integer (0..0x0FFFFFFF) that hako shifts
into the private wire range (0x10000000+). Callers pick 1, 2, 3...
per application; the shift is a compile-time add with no per-encode
cost. The full wire id (returned) can be passed to
`register-user-tag-raw!` for cross-app registrations.
raw docstring

register-user-tag-raw!clj

(register-user-tag-raw! wire-id klass write-fn read-fn)

Register with a full u32 wire id (0..0xFFFFFFFF). Escape hatch for callers coordinating on an external id scheme; most callers should use register-user-tag! with a small (0..0x0FFFFFFF) id.

Register with a full u32 wire id (0..0xFFFFFFFF). Escape hatch for
callers coordinating on an external id scheme; most callers should
use `register-user-tag!` with a small (0..0x0FFFFFFF) id.
raw docstring

tagged-value?clj

(tagged-value? x)

user-tag-for-classclj

(user-tag-for-class klass)

user-tag-readerclj

(user-tag-reader id)

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