Liking cljdoc? Tell your friends :D

miner.tagged


class->factoryclj

(class->factory record-class)

Returns the map-style record factory for the record-class.

Returns the map-style record factory for the `record-class`.
sourceraw docstring

class->tagclj

(class->tag record-class)

Returns the tag symbol for the given record-class.

Returns the tag symbol for the given `record-class`.
sourceraw docstring

data-readerclj

(data-reader tag tag-reader)
(data-reader tag tag-reader & more-tag-readers)

Returns a data-reader for a particular tag derived from one or more tag-readers.

Returns a data-reader for a particular tag derived from one or more tag-readers.
sourceraw docstring

default-tagged-read-optionsclj

source

EdnTagcljprotocol

edn-strclj

(edn-str this)

edn-tagclj

(edn-tag this)

edn-valueclj

(edn-value this)
source

pr-tagged-record-onclj

(pr-tagged-record-on this w)

Prints the EDN tagged literal representation of the record this on the java.io.Writer w. Useful for implementing a print-method on a record class. For example:

(defmethod print-method my.ns.MyRecord [this w] (miner.tagged/pr-tagged-record-on this w))

Prints the EDN tagged literal representation of the record `this` on the java.io.Writer `w`.
Useful for implementing a print-method on a record class.  For example:

   (defmethod print-method my.ns.MyRecord [this w]
     (miner.tagged/pr-tagged-record-on this w))
sourceraw docstring

readclj

(read)
(read stream)
(read options stream)

Like clojure.edn/read but the :default option is tagged-default-reader.

Like clojure.edn/read but the :default option is `tagged-default-reader`.
sourceraw docstring

read-stringclj

(read-string s)
(read-string options s)

Like clojure.edn/read-string but the :default option is tagged-default-reader.

Like clojure.edn/read-string but the :default option is `tagged-default-reader`.
sourceraw docstring

record-tag-readerclj

(record-tag-reader tag val)

If the tag corresponds to a record class (for example, tag my.ns/Rec matches record my.ns.Rec) and the val is a map, use the record factory to return a value. Otherwise, nil.

If the tag corresponds to a record class (for example, tag my.ns/Rec matches record
my.ns.Rec) and the `val` is a map, use the record factory to return a value.  Otherwise,
nil.
sourceraw docstring

safe-tag-readerclj

(safe-tag-reader)
(safe-tag-reader tag-reader)
(safe-tag-reader r1 r2)
(safe-tag-reader r1 r2 r3)
(safe-tag-reader r1 r2 r3 & more)

Takes any number of tag-reader functions and returns a composite tag-reader which will either return a truthy value or throw an exception if the tag cannot be handled appropriately with the value.

Takes any number of tag-reader functions and returns a composite tag-reader which will
either return a truthy value or throw an exception if the tag cannot be handled
appropriately with the value.
sourceraw docstring

some-tag-readerclj

(some-tag-reader)
(some-tag-reader tag-reader)
(some-tag-reader r1 r2)
(some-tag-reader r1 r2 r3)
(some-tag-reader r1 r2 r3 & more)

Takes any number of tag-reader functions and returns a composite tag-reader that applies the tag-readers in order returning the first truthy result (or nil if none).

Takes any number of tag-reader functions and returns a composite tag-reader that applies
the tag-readers in order returning the first truthy result (or nil if none).
sourceraw docstring

tag->factoryclj

(tag->factory tag)

Returns the map-style record factory for the tag symbol. Returns nil if tag does not refer to a record. Results are memoized.

Returns the map-style record factory for the `tag` symbol.  Returns nil if `tag` does not
refer to a record.  Results are memoized.
sourceraw docstring

tagged-default-readerclj

Default data-reader for reading an EDN tagged literal as a Record. If the tag corresponds to a known Record class (tag my.ns/Rec for class my.ns.Rec), use that Record's map-style factory on the given map value. If the tag is unknown, use the tagged-literal.

Default data-reader for reading an EDN tagged literal as a Record.  If the tag corresponds to a
known Record class (tag my.ns/Rec for class my.ns.Rec), use that Record's map-style factory on
the given map value.  If the tag is unknown, use the `tagged-literal`.
sourceraw docstring

throw-tag-readerclj

(throw-tag-reader tag val)

Always throws an exception for a tag and val.

Always throws an exception for a `tag` and `val`.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close