Liking cljdoc? Tell your friends :D

phlegyas.transformers


transformclj

(transform frame layout)

Takes in data and layout and assembles it into a byte-array. If the data requires a transformer, it looks this up in the transformer map and executes the function on the data.

Otherwise, it looks up the buffer operator in the buffer-operator map, as defined in the phlegyas.types namespace, and executes this operation on the data to write to the given byte-array by wrapping it first in a ByteBuffer.

Takes in data and layout and assembles it into a byte-array.
If the data requires a transformer, it looks this up in the transformer map
and executes the function on the data.

Otherwise, it looks up the buffer operator in the `buffer-operator` map, as
defined in the `phlegyas.types` namespace, and executes this operation on
the data to write to the given byte-array by wrapping it first in a ByteBuffer.
sourceraw docstring

transform-dataclj

(transform-data coll)

This is a special function. If you are encoding a Rread of a directory, you can pass :data {:type :directory :data [stat1 ... statn]}} into construct-packet, and it will also automatically encode your directory stat structures properly. Otherwise, just pass a raw byte-array to :data for it to get packed regularly.

This is a special function. If you are encoding a Rread of a directory,
you can pass `:data {:type :directory :data [stat1 ... statn]}}` into
`construct-packet`, and it will also automatically encode your directory
stat structures properly. Otherwise, just pass a raw byte-array to `:data`
for it to get packed regularly.
sourceraw docstring

transform-directoryclj

(transform-directory coll)

Instrumented directory encoder. Takes in a vector of stat structures, and produces a byte collection suitable for use in Rread.

Instrumented directory encoder. Takes in a vector of stat structures,
and produces a byte collection suitable for use in `Rread`.
sourceraw docstring

transform-nwqidsclj

(transform-nwqids coll)

Takes in a vector of QID structures, prefixes them with a short count field, and encodes.

Takes in a vector of QID structures, prefixes them with a short
count field, and encodes.
sourceraw docstring

transform-raw-dataclj

(transform-raw-data data-bytes)

Takes in a byte-array, and prefixes it with the size, as required by the Rread and Twrite messages.

Takes in a byte-array, and prefixes it with the size, as required by the
`Rread` and `Twrite` messages.
sourceraw docstring

transform-stringclj

(transform-string s)

Encodes a string. Strings in 9P2000 are UTF-8, with a short field of their length prefixing them.

Encodes a string. Strings in 9P2000 are UTF-8, with a short field of
their length prefixing them.
sourceraw docstring

transform-wnamesclj

(transform-wnames coll)

Takes in a vector of wnames, for the :Twalk message, and encodes them, prefixing with a short count field as required.

Takes in a vector of wnames, for the `:Twalk` message, and encodes
them, prefixing with a short count field as required.
sourceraw docstring

transformerclj

source

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

× close