Liking cljdoc? Tell your friends :D

pbwire.core


close!clj

(close! x)

Closes a schema or a message root; child views need no closing.

Closes a schema or a message root; child views need no closing.
sourceraw docstring

decodeclj

(decode t wire)

Decodes wire bytes to a persistent map. Unknown fields are preserved for re-encoding by the codec, but they have no schema names so they do not appear in the map; a truncated or malformed payload throws.

Decodes wire bytes to a persistent map. Unknown fields are preserved
for re-encoding by the codec, but they have no schema names so they do
not appear in the map; a truncated or malformed payload throws.
sourceraw docstring

decode-messageclj

(decode-message t wire)

Decodes wire bytes to a mutable message. No map materialization. Close it when done.

Decodes wire bytes to a mutable message. No map materialization. Close it when done.
sourceraw docstring

encodeclj

(encode t m)

Encodes a map to wire bytes. Unknown map keys are an error, not silence.

Encodes a map to wire bytes. Unknown map keys are an error, not silence.
sourceraw docstring

encode-delimitedclj

(encode-delimited msg)

One length-delimited frame (varint length + message).

One length-delimited frame (varint length + message).
sourceraw docstring

encode-deterministicclj

(encode-deterministic msg)

Wire bytes with map entries sorted by key, so equal messages encode to equal bytes regardless of insertion order.

Wire bytes with map entries sorted by key, so equal messages encode to
equal bytes regardless of insertion order.
sourceraw docstring

encode-messageclj

(encode-message msg)

Encodes an already-filled mutable message. No map walk.

Encodes an already-filled mutable message. No map walk.
sourceraw docstring

fill-message!clj

(fill-message! msg m)

Fills a mutable message from a map (schema order, canonical bytes). For hot loops: fill once, encode-message many times.

Fills a mutable message from a map (schema order, canonical bytes). For hot loops: fill once, encode-message many times.
sourceraw docstring

from-jsonclj

(from-json t text)
(from-json t text ignore-unknown? limits)

Parses JSON mapping text into a persistent map. Unknown field names throw unless ignore-unknown? is true; limits is nil or a Java Limits.

Parses JSON mapping text into a persistent map. Unknown field names throw
unless `ignore-unknown?` is true; `limits` is nil or a Java Limits.
sourceraw docstring

from-textclj

(from-text t text)
(from-text t text limits)

Parses text format into a persistent map; limits is nil or a Limits.

Parses text format into a persistent map; `limits` is nil or a Limits.
sourceraw docstring

json-of-mapclj

(json-of-map t m)

JSON mapping text for a map of this type.

JSON mapping text for a map of this type.
sourceraw docstring

load-schemaclj

(load-schema path)

Loads a descriptor set written by protoc --descriptor_set_out.

Loads a descriptor set written by `protoc --descriptor_set_out`.
sourceraw docstring

load-schema-bytesclj

(load-schema-bytes blob)

Loads descriptor-set bytes; use --include_imports so every type resolves.

Loads descriptor-set bytes; use `--include_imports` so every type resolves.
sourceraw docstring

message-typeclj

(message-type schema full-name)

Looks up a message by fully qualified name, e.g. "structtest.Scalars3".

Looks up a message by fully qualified name, e.g. "structtest.Scalars3".
sourceraw docstring

new-messageclj

(new-message t)

A new mutable message of this type; close it when done. Fill once with fill-message!, then encode-message reuses it without a map walk.

A new mutable message of this type; close it when done. Fill once with fill-message!, then encode-message reuses it without a map walk.
sourceraw docstring

text-of-mapclj

(text-of-map t m)
(text-of-map t m print-unknown?)

Text format for a map of this type; unknown fields print unless print-unknown? is false.

Text format for a map of this type; unknown fields print unless
`print-unknown?` is false.
sourceraw docstring

to-jsonclj

(to-json msg)

Protobuf JSON mapping text of a message (mutable Message).

Protobuf JSON mapping text of a message (mutable Message).
sourceraw docstring

to-textclj

(to-text msg)
(to-text msg print-unknown?)

Protobuf text format; unknown fields print as numeric lines unless print-unknown? is false.

Protobuf text format; unknown fields print as numeric lines unless
`print-unknown?` is false.
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