API reference
GD.data
Data conversion for bytes, binary codecs, hashes, key derivation, and in-memory CSV, INI, TOML, YAML, JSON, XML, and related formats. Invalid input and settings return failures.
Methods
gzip_writer(writer: RefCounted, level: int = -1) -> GDGzipWriter, Errcsv(src: String, sep: String = ",") -> Array, Errto_csv(rows: Array, sep: String = ",") -> Stringcsv_objects(src: String, sep: String = ",") -> Array, Errto_csv_objects(items: Array, sep: String = ",") -> Stringini(src: String) -> Dictionary, Errto_ini(data: Dictionary) -> Stringtoml(src: String) -> Dictionary, Errto_toml(data: Dictionary, prefix: String = "") -> String, Erryaml(src: String) -> Variant, Errto_yaml(data: Variant, depth: int = 0) -> String, Errjsonc(src: String) -> Variant, Errstrip_jsonc(src: String) -> Stringjsonl(src: String) -> Array, Errto_jsonl(items: Array) -> String, Errjsonl_reader() -> GDJSONLReaderfront_matter(src: String) -> Dictionary, Errhas_front_matter(src: String) -> boolto_front_matter(attrs: Dictionary, body: String, kind: String = "yaml") -> String, Errxml(src: String) -> Dictionary, Errto_xml(data: Dictionary, indent: int = 0) -> String, Errenv(src: String) -> Dictionary, Errto_env(data: Dictionary) -> String, Errtar(entries: Array) -> PackedByteArray, Erruntar(data: PackedByteArray) -> Array, Errjson_encode(value: Variant, opts: Dictionary = { }) -> PackedByteArray, Errjson_decode(data: PackedByteArray) -> Variant, Errhex_encode(data: PackedByteArray) -> Stringhex_decode(text: String) -> PackedByteArray, Errbase64_encode(data: PackedByteArray) -> Stringbase64_decode(text: String, raw: bool = false) -> PackedByteArray, Errbase64url_encode(data: PackedByteArray) -> Stringbase64url_decode(text: String, raw: bool = true) -> PackedByteArray, Errbase32_encode(data: PackedByteArray) -> Stringbase32_decode(text: String, raw: bool = false) -> PackedByteArray, Errvarint_encode(n: int) -> PackedByteArrayvarint_decode(data: PackedByteArray, at: int = 0) -> Dictionary, Errconcat(parts: Array) -> PackedByteArrayequals(a: PackedByteArray, b: PackedByteArray) -> boolincludes(hay: PackedByteArray, needle: PackedByteArray) -> boolindex_of(hay: PackedByteArray, needle: PackedByteArray, from: int = 0) -> intlast_index_of(hay: PackedByteArray, needle: PackedByteArray) -> intstarts_with(hay: PackedByteArray, prefix: PackedByteArray) -> boolends_with(hay: PackedByteArray, suffix: PackedByteArray) -> boolrepeat(src: PackedByteArray, times: int) -> PackedByteArrayfit(src: PackedByteArray, size: int) -> PackedByteArraysplit(src: PackedByteArray, sep: PackedByteArray) -> Arraymsgpack(value: Variant) -> PackedByteArray, Errunmsgpack(data: PackedByteArray) -> Variant, Errcbor(value: Variant) -> PackedByteArray, Erruncbor(data: PackedByteArray) -> Variant, Errsha224(msg: PackedByteArray) -> PackedByteArraysha256(msg: PackedByteArray) -> PackedByteArraysha384(msg: PackedByteArray) -> PackedByteArraysha512(msg: PackedByteArray) -> PackedByteArraysha3_224(msg: PackedByteArray) -> PackedByteArraysha3_256(msg: PackedByteArray) -> PackedByteArraysha3_384(msg: PackedByteArray) -> PackedByteArraysha3_512(msg: PackedByteArray) -> PackedByteArraysha1(msg: PackedByteArray) -> PackedByteArrayhmac(hash: String, key: PackedByteArray, msg: PackedByteArray) -> PackedByteArray, Errhmac_sha256(key: PackedByteArray, msg: PackedByteArray) -> PackedByteArrayxor_bytes(a: PackedByteArray, b: PackedByteArray) -> PackedByteArrayequal_ct(a: PackedByteArray, b: PackedByteArray) -> boolpbkdf2_sha256(password: PackedByteArray, salt: PackedByteArray, rounds: int) -> PackedByteArray, Errpbkdf2(hash: String, password: PackedByteArray, salt: PackedByteArray, rounds: int, size: int) -> PackedByteArray, Errhkdf(hash: String, secret: PackedByteArray, salt: PackedByteArray, info: PackedByteArray, size: int) -> PackedByteArray, Errhkdf_extract(hash: String, secret: PackedByteArray, salt: PackedByteArray) -> PackedByteArray, Errhkdf_expand(hash: String, key: PackedByteArray, info: PackedByteArray, size: int) -> PackedByteArray, Errpbkdf2_sha256_async(password: PackedByteArray, salt: PackedByteArray, rounds: int) -> await PackedByteArray, Errpbkdf2_async(hash: String, password: PackedByteArray, salt: PackedByteArray, rounds: int, size: int) -> await PackedByteArray, Errhkdf_async(hash: String, secret: PackedByteArray, salt: PackedByteArray, info: PackedByteArray, size: int) -> await PackedByteArray, Errhkdf_extract_async(hash: String, secret: PackedByteArray, salt: PackedByteArray) -> await PackedByteArray, Errhkdf_expand_async(hash: String, key: PackedByteArray, info: PackedByteArray, size: int) -> await PackedByteArray, Errjson_encode_async(value: Variant, opts: Dictionary = { }) -> await PackedByteArray, Errjson_decode_async(data: PackedByteArray) -> await Variant, Errmsgpack_async(value: Variant) -> await PackedByteArray, Errunmsgpack_async(data: PackedByteArray) -> await Variant, Errcbor_async(value: Variant) -> await PackedByteArray, Erruncbor_async(data: PackedByteArray) -> await Variant, Errsha224_async(msg: PackedByteArray) -> await PackedByteArraysha256_async(msg: PackedByteArray) -> await PackedByteArraysha384_async(msg: PackedByteArray) -> await PackedByteArraysha512_async(msg: PackedByteArray) -> await PackedByteArraysha3_224_async(msg: PackedByteArray) -> await PackedByteArraysha3_256_async(msg: PackedByteArray) -> await PackedByteArraysha3_384_async(msg: PackedByteArray) -> await PackedByteArraysha3_512_async(msg: PackedByteArray) -> await PackedByteArraysha1_async(msg: PackedByteArray) -> await PackedByteArrayhmac_async(hash: String, key: PackedByteArray, msg: PackedByteArray) -> await PackedByteArray, Errhmac_sha256_async(key: PackedByteArray, msg: PackedByteArray) -> await PackedByteArrayhex_encode_async(data: PackedByteArray) -> await Stringhex_decode_async(text: String) -> await PackedByteArray, Errbase64_encode_async(data: PackedByteArray) -> await Stringbase64_decode_async(text: String, raw: bool = false) -> await PackedByteArray, Errbase64url_encode_async(data: PackedByteArray) -> await Stringbase64url_decode_async(text: String, raw: bool = true) -> await PackedByteArray, Errbase32_encode_async(data: PackedByteArray) -> await Stringbase32_decode_async(text: String, raw: bool = false) -> await PackedByteArray, Errconcat_async(parts: Array) -> await PackedByteArrayequals_async(a: PackedByteArray, b: PackedByteArray) -> await boolincludes_async(hay: PackedByteArray, needle: PackedByteArray) -> await boolindex_of_async(hay: PackedByteArray, needle: PackedByteArray, from: int = 0) -> await intlast_index_of_async(hay: PackedByteArray, needle: PackedByteArray) -> await intstarts_with_async(hay: PackedByteArray, prefix: PackedByteArray) -> await boolends_with_async(hay: PackedByteArray, suffix: PackedByteArray) -> await boolrepeat_async(src: PackedByteArray, times: int) -> await PackedByteArrayfit_async(src: PackedByteArray, size: int) -> await PackedByteArraysplit_async(src: PackedByteArray, sep: PackedByteArray) -> await Arrayxor_bytes_async(a: PackedByteArray, b: PackedByteArray) -> await PackedByteArrayequal_ct_async(a: PackedByteArray, b: PackedByteArray) -> await boolcsv_async(src: String, sep: String = ",") -> await Array, Errto_csv_async(rows: Array, sep: String = ",") -> await Stringcsv_objects_async(src: String, sep: String = ",") -> await Array, Errto_csv_objects_async(items: Array, sep: String = ",") -> await Stringini_async(src: String) -> await Dictionary, Errto_ini_async(data: Dictionary) -> await Stringtoml_async(src: String) -> await Dictionary, Errto_toml_async(data: Dictionary, prefix: String = "") -> await String, Erryaml_async(src: String) -> await Variant, Errto_yaml_async(data: Variant, depth: int = 0) -> await String, Errjsonc_async(src: String) -> await Variant, Errstrip_jsonc_async(src: String) -> await Stringjsonl_async(src: String) -> await Array, Errto_jsonl_async(items: Array) -> await String, Errfront_matter_async(src: String) -> await Dictionary, Errto_front_matter_async(attrs: Dictionary, body: String, kind: String = "yaml") -> await String, Errxml_async(src: String) -> await Dictionary, Errto_xml_async(data: Dictionary, indent: int = 0) -> await String, Errenv_async(src: String) -> await Dictionary, Errto_env_async(data: Dictionary) -> await String, Errtar_async(entries: Array) -> await PackedByteArray, Erruntar_async(data: PackedByteArray) -> await Array, Err
gzip_writer
gzip_writer(writer: RefCounted, level: int = -1) -> GDGzipWriter, ErrCreate a compressor writing to a byte destination.
Create a GDGzipWriter over a byte Writer. Compression runs on CPU workers and preserves downstream backpressure. Levels: -2 Huffman only, -1 default, 0..9. Close finishes the gzip member but leaves the destination open; reset reuses the compressor at the same level.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
writer | RefCounted | Required | Byte destination exposing a write operation. |
level | int | -1 | Compression level: -2 Huffman only, -1 default, or 0 through 9. |
Return value
GDGzipWriter, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
csv
csv(src: String, sep: String = ",") -> Array, ErrRead and write in-memory document formats.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | String | Required | Source input to read or transform; file operations interpret it as a source path. |
sep | String | "," | Separator used to split or join records or fields. |
Return value
Array, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
to_csv
to_csv(rows: Array, sep: String = ",") -> StringEncode rows as delimited text, quoting fields that contain separators, quotes, or line endings.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
rows | Array | Required | Rows in input order. Batch database calls use one parameter set per row. |
sep | String | "," | Separator used to split or join records or fields. |
Return value
String
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
csv_objects
csv_objects(src: String, sep: String = ",") -> Array, ErrParse delimited text using its first row as field names for the remaining object rows.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | String | Required | Source input to read or transform; file operations interpret it as a source path. |
sep | String | "," | Separator used to split or join records or fields. |
Return value
Array, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
to_csv_objects
to_csv_objects(items: Array, sep: String = ",") -> StringEncode object rows as delimited text with a header row naming their fields.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
items | Array | Required | Input elements to transform or collect, in their supplied order. |
sep | String | "," | Separator used to split or join records or fields. |
Return value
String
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
ini
ini(src: String) -> Dictionary, ErrParse sectioned key-value text into a dictionary.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | String | Required | Source input to read or transform; file operations interpret it as a source path. |
Return value
Dictionary, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
to_ini
to_ini(data: Dictionary) -> StringSerialize a dictionary as sectioned key-value text.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | Dictionary | Required | Input data in the representation shown by the parameter type. |
Return value
String
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
toml
toml(src: String) -> Dictionary, ErrParse configuration text into its structured values and report malformed input.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | String | Required | Source input to read or transform; file operations interpret it as a source path. |
Return value
Dictionary, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
to_toml
to_toml(data: Dictionary, prefix: String = "") -> String, ErrSerialize configuration values with an optional table prefix; unsupported values return an error.
Return the encoded value and Err. Inputs that cannot be represented produce an Err instead of omitted entries or an empty success value.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | Dictionary | Required | Input data in the representation shown by the parameter type. |
prefix | String | "" | Table path prefix prepended to encoded tables. |
Return value
String, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
yaml
yaml(src: String) -> Variant, ErrParse indentation-based document text into structured values and report malformed input.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | String | Required | Source input to read or transform; file operations interpret it as a source path. |
Return value
Variant, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
to_yaml
to_yaml(data: Variant, depth: int = 0) -> String, ErrSerialize structured values using the requested initial indentation depth.
Return the encoded value and Err. Inputs that cannot be represented produce an Err instead of omitted entries or an empty success value.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | Variant | Required | Input data in the representation shown by the parameter type. |
depth | int | 0 | Initial nesting or indentation depth for serialization. |
Return value
String, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
jsonc
jsonc(src: String) -> Variant, ErrDecode JSON text permitting comments and trailing commas.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | String | Required | Source input to read or transform; file operations interpret it as a source path. |
Return value
Variant, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
strip_jsonc
strip_jsonc(src: String) -> StringRemove comments and trailing commas from JSON-like text before strict decoding.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | String | Required | Source input to read or transform; file operations interpret it as a source path. |
Return value
String
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
jsonl
jsonl(src: String) -> Array, ErrDecode newline-delimited JSON records into an array; malformed records return an error.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | String | Required | Source input to read or transform; file operations interpret it as a source path. |
Return value
Array, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
to_jsonl
to_jsonl(items: Array) -> String, ErrEncode each supplied value as one JSON record terminated by a newline.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
items | Array | Required | Input elements to transform or collect, in their supplied order. |
Return value
String, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
jsonl_reader
jsonl_reader() -> GDJSONLReaderCreate a sequential JSON Lines reader.
Parameters
No parameters.
Return value
GDJSONLReader
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
front_matter
front_matter(src: String) -> Dictionary, ErrSplit document metadata from the body and parse its declared metadata format.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | String | Required | Source input to read or transform; file operations interpret it as a source path. |
Return value
Dictionary, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
has_front_matter
has_front_matter(src: String) -> boolReturn whether the document begins with a recognized metadata delimiter.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | String | Required | Source input to read or transform; file operations interpret it as a source path. |
Return value
bool
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
to_front_matter
to_front_matter(attrs: Dictionary, body: String, kind: String = "yaml") -> String, ErrEncode attributes in the selected metadata format and prepend them to the document body.
Return the encoded value and Err. Inputs that cannot be represented produce an Err instead of omitted entries or an empty success value.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
attrs | Dictionary | Required | Named attributes to encode in markup or document metadata. |
body | String | Required | Content to write or include in the response. |
kind | String | "yaml" | Metadata format: yaml, toml or json. |
Return value
String, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
xml
xml(src: String) -> Dictionary, ErrParse markup text into a structured dictionary and report malformed input.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | String | Required | Source input to read or transform; file operations interpret it as a source path. |
Return value
Dictionary, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
to_xml
to_xml(data: Dictionary, indent: int = 0) -> String, ErrEncode a document dictionary as markup using the supplied indentation width.
Return the encoded value and Err. Inputs that cannot be represented produce an Err instead of omitted entries or an empty success value.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | Dictionary | Required | Input data in the representation shown by the parameter type. |
indent | int | 0 | Number of spaces per indentation level. |
Return value
String, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
env
env(src: String) -> Dictionary, ErrParse environment-assignment text into a dictionary without changing process variables.
Return an environment dictionary and Err. Invalid names and unterminated quotes return an Err.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | String | Required | Source input to read or transform; file operations interpret it as a source path. |
Return value
Dictionary, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
to_env
to_env(data: Dictionary) -> String, ErrEncode key-value pairs as environment assignments, quoting values when necessary.
Return the encoded value and Err. Inputs that cannot be represented produce an Err instead of omitted entries or an empty success value.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | Dictionary | Required | Input data in the representation shown by the parameter type. |
Return value
String, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
tar
tar(entries: Array) -> PackedByteArray, ErrPack named entries into an in-memory archive without writing files.
Return the encoded value and Err. Inputs that cannot be represented produce an Err instead of omitted entries or an empty success value.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
entries | Array | Required | Archive entries containing their names and content. |
Return value
PackedByteArray, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
untar
untar(data: PackedByteArray) -> Array, ErrDecode an in-memory archive into entries without extracting them onto the filesystem.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | PackedByteArray | Required | Input data in the representation shown by the parameter type. |
Return value
Array, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
json_encode
json_encode(value: Variant, opts: Dictionary = { }) -> PackedByteArray, ErrEncode a value as strict JSON UTF-8 bytes.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
value | Variant | Required | Value to serialize. |
opts | Dictionary | { } | Encoding options for formatting and validation. |
Return value
PackedByteArray, Err
UTF-8 encoded JSON bytes.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
Unsupported or cyclic values and non-finite numbers return Err.
Non-finite numbers, unsupported types, and cycles fail instead of becoming ambiguous values.
Options: deterministic and escape_html are bool; max_bytes and max_depth are int. A wrong type returns Err.INVALID_DATA, and exceeding a limit returns Err.LIMITED.
Keep the input Arrays, Dictionaries, and their children unchanged until json_encode_async() finishes. The options dictionary is copied at the start.
See also
json_decode
json_decode(data: PackedByteArray) -> Variant, ErrDecode bytes as strict JSON.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | PackedByteArray | Required | UTF-8 JSON input bytes. |
Return value
Variant, Err
Parsed value; a successful null is distinct from a parse failure.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
Malformed JSON or invalid input encoding returns Err.
Invalid UTF-8 and duplicate names fail. An integer within the signed 64-bit range stays int; fractions, exponents, and out-of-range values become float. \u0000 in strings and keys is preserved.
See also
hex_encode
hex_encode(data: PackedByteArray) -> StringEncode bytes as hexadecimal text.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | PackedByteArray | Required | Input data in the representation shown by the parameter type. |
Return value
String
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
hex_decode
hex_decode(text: String) -> PackedByteArray, ErrDecode hexadecimal text into bytes.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
text | String | Required | Text to inspect, decode or transform; the input is not modified in place. |
Return value
PackedByteArray, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
base64_encode
base64_encode(data: PackedByteArray) -> StringEncode bytes as Base64 text.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | PackedByteArray | Required | Input data in the representation shown by the parameter type. |
Return value
String
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
base64_decode
base64_decode(text: String, raw: bool = false) -> PackedByteArray, ErrDecode Base64 text into bytes.
Decode with standard padding by default; raw=true selects unpadded input. Return partial bytes with Err. Base32 uses uppercase letters.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
text | String | Required | Text to inspect, decode or transform; the input is not modified in place. |
raw | bool | false | Whether unpadded input is decoded using the raw alphabet form. |
Return value
PackedByteArray, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
base64url_encode
base64url_encode(data: PackedByteArray) -> StringEncode bytes as URL-safe Base64 text.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | PackedByteArray | Required | Input data in the representation shown by the parameter type. |
Return value
String
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
base64url_decode
base64url_decode(text: String, raw: bool = true) -> PackedByteArray, ErrDecode URL-safe Base64 text into bytes.
Decode the URL-safe alphabet; raw=true is the default. Set raw=false for padded input. Identity-sensitive signature parsing applies separate canonical checks.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
text | String | Required | Text to inspect, decode or transform; the input is not modified in place. |
raw | bool | true | Whether to decode an unpadded representation. |
Return value
PackedByteArray, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
base32_encode
base32_encode(data: PackedByteArray) -> StringEncode bytes as Base32 text.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | PackedByteArray | Required | Input data in the representation shown by the parameter type. |
Return value
String
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
base32_decode
base32_decode(text: String, raw: bool = false) -> PackedByteArray, ErrDecode Base32 text into bytes.
Decode with standard padding by default; raw=true selects unpadded input. Return partial bytes with Err. Base32 uses uppercase letters.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
text | String | Required | Text to inspect, decode or transform; the input is not modified in place. |
raw | bool | false | Whether to decode an unpadded representation. |
Return value
PackedByteArray, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
varint_encode
varint_encode(n: int) -> PackedByteArrayEncode an integer as variable-length bytes.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
n | int | Required | Integer input to encode or use as the operation's numeric argument. |
Return value
PackedByteArray
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
varint_decode
varint_decode(data: PackedByteArray, at: int = 0) -> Dictionary, ErrRead an integer from variable-length bytes.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | PackedByteArray | Required | Input data in the representation shown by the parameter type. |
at | int | 0 | Zero-based byte offset at which decoding begins. |
Return value
Dictionary, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
concat
concat(parts: Array) -> PackedByteArrayConcatenate byte sequences.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
parts | Array | Required | Components assembled by the operation, in the representation shown by the type. |
Return value
PackedByteArray
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
equals
equals(a: PackedByteArray, b: PackedByteArray) -> boolCheck whether two byte sequences are equal.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
a | PackedByteArray | Required | First input or comparison operand. |
b | PackedByteArray | Required | Second input or comparison operand. |
Return value
bool
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
includes
includes(hay: PackedByteArray, needle: PackedByteArray) -> boolCheck whether bytes contain a subsequence.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
hay | PackedByteArray | Required | Byte sequence searched for the requested pattern. |
needle | PackedByteArray | Required | Byte pattern to find in the searched sequence. |
Return value
bool
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
index_of
index_of(hay: PackedByteArray, needle: PackedByteArray, from: int = 0) -> intReturn the first byte-subsequence position.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
hay | PackedByteArray | Required | Byte sequence searched for the requested pattern. |
needle | PackedByteArray | Required | Byte pattern to find in the searched sequence. |
from | int | 0 | Starting point used by the operation. |
Return value
int
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
last_index_of
last_index_of(hay: PackedByteArray, needle: PackedByteArray) -> intReturn the last byte-subsequence position.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
hay | PackedByteArray | Required | Byte sequence searched for the requested pattern. |
needle | PackedByteArray | Required | Byte pattern to find in the searched sequence. |
Return value
int
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
starts_with
starts_with(hay: PackedByteArray, prefix: PackedByteArray) -> boolCheck whether bytes begin with a prefix.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
hay | PackedByteArray | Required | Byte sequence searched for the requested pattern. |
prefix | PackedByteArray | Required | Prefix applied when constructing the resulting names, paths or output. |
Return value
bool
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
ends_with
ends_with(hay: PackedByteArray, suffix: PackedByteArray) -> boolCheck whether bytes end with a suffix.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
hay | PackedByteArray | Required | Byte sequence searched for the requested pattern. |
suffix | PackedByteArray | Required | Suffix to test or remove from the end of the input. |
Return value
bool
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
repeat
repeat(src: PackedByteArray, times: int) -> PackedByteArrayRepeat a byte sequence the specified number of times.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | PackedByteArray | Required | Source input to read or transform; file operations interpret it as a source path. |
times | int | Required | Number of repetitions of the input sequence. |
Return value
PackedByteArray
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
fit
fit(src: PackedByteArray, size: int) -> PackedByteArrayResize a byte sequence to the specified length.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | PackedByteArray | Required | Source input to read or transform; file operations interpret it as a source path. |
size | int | Required | Requested output length in bytes. |
Return value
PackedByteArray
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
split
split(src: PackedByteArray, sep: PackedByteArray) -> ArraySplit bytes on a delimiter sequence.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | PackedByteArray | Required | Source input to read or transform; file operations interpret it as a source path. |
sep | PackedByteArray | Required | Separator used to split or join records or fields. |
Return value
Array
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
msgpack
msgpack(value: Variant) -> PackedByteArray, ErrEncode a value as MessagePack.
Return the encoded value and Err. Inputs that cannot be represented produce an Err instead of omitted entries or an empty success value.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
value | Variant | Required | Structured value to serialize into the selected data format. |
Return value
PackedByteArray, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
unmsgpack
unmsgpack(data: PackedByteArray) -> Variant, ErrDecode MessagePack into a value.
Decode MessagePack without losing text bytes. Non-UTF-8 or NUL-containing text remains PackedByteArray; leading BOM is preserved.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | PackedByteArray | Required | Input data in the representation shown by the parameter type. |
Return value
Variant, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
cbor
cbor(value: Variant) -> PackedByteArray, ErrEncode a value as CBOR.
Return the encoded value and Err. Inputs that cannot be represented produce an Err instead of omitted entries or an empty success value.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
value | Variant | Required | Structured value to serialize into the selected data format. |
Return value
PackedByteArray, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
uncbor
uncbor(data: PackedByteArray) -> Variant, ErrDecode CBOR into a value.
Decode CBOR and report malformed UTF-8 text as Err. Valid text containing NUL remains PackedByteArray without truncation.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | PackedByteArray | Required | Input data in the representation shown by the parameter type. |
Return value
Variant, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
sha224
sha224(msg: PackedByteArray) -> PackedByteArrayCompute a SHA-224 digest.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
msg | PackedByteArray | Required | Bytes to hash or authenticate. |
Return value
PackedByteArray
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
sha256
sha256(msg: PackedByteArray) -> PackedByteArrayCompute a SHA-256 digest.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
msg | PackedByteArray | Required | Bytes to hash or authenticate. |
Return value
PackedByteArray
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
sha384
sha384(msg: PackedByteArray) -> PackedByteArrayCompute a SHA-384 digest.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
msg | PackedByteArray | Required | Bytes to hash or authenticate. |
Return value
PackedByteArray
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
sha512
sha512(msg: PackedByteArray) -> PackedByteArrayCompute a SHA-512 digest.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
msg | PackedByteArray | Required | Bytes to hash or authenticate. |
Return value
PackedByteArray
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
sha3_224
sha3_224(msg: PackedByteArray) -> PackedByteArrayCompute a SHA3-224 digest.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
msg | PackedByteArray | Required | Bytes to hash or authenticate. |
Return value
PackedByteArray
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
sha3_256
sha3_256(msg: PackedByteArray) -> PackedByteArrayCompute a SHA3-256 digest.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
msg | PackedByteArray | Required | Bytes to hash or authenticate. |
Return value
PackedByteArray
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
sha3_384
sha3_384(msg: PackedByteArray) -> PackedByteArrayCompute a SHA3-384 digest.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
msg | PackedByteArray | Required | Bytes to hash or authenticate. |
Return value
PackedByteArray
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
sha3_512
sha3_512(msg: PackedByteArray) -> PackedByteArrayCompute a SHA3-512 digest.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
msg | PackedByteArray | Required | Bytes to hash or authenticate. |
Return value
PackedByteArray
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
sha1
sha1(msg: PackedByteArray) -> PackedByteArrayCompute a SHA-1 digest.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
msg | PackedByteArray | Required | Bytes to hash or authenticate. |
Return value
PackedByteArray
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
hmac
hmac(hash: String, key: PackedByteArray, msg: PackedByteArray) -> PackedByteArray, ErrCompute HMAC with the selected hash.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
hash | String | Required | Digest algorithm name selected for the operation. |
key | PackedByteArray | Required | Authentication key or pseudorandom key bytes for this operation. |
msg | PackedByteArray | Required | Bytes to hash or authenticate. |
Return value
PackedByteArray, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
hmac_sha256
hmac_sha256(key: PackedByteArray, msg: PackedByteArray) -> PackedByteArrayCompute HMAC-SHA-256.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
key | PackedByteArray | Required | Authentication key or pseudorandom key bytes for this operation. |
msg | PackedByteArray | Required | Bytes to hash or authenticate. |
Return value
PackedByteArray
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
xor_bytes
xor_bytes(a: PackedByteArray, b: PackedByteArray) -> PackedByteArrayCombine two byte sequences with exclusive OR.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
a | PackedByteArray | Required | First input or comparison operand. |
b | PackedByteArray | Required | Second input or comparison operand. |
Return value
PackedByteArray
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
equal_ct
equal_ct(a: PackedByteArray, b: PackedByteArray) -> boolCompare two byte sequences in constant time.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
a | PackedByteArray | Required | First input or comparison operand. |
b | PackedByteArray | Required | Second input or comparison operand. |
Return value
bool
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
pbkdf2_sha256
pbkdf2_sha256(password: PackedByteArray, salt: PackedByteArray, rounds: int) -> PackedByteArray, ErrDerive a key with PBKDF2-HMAC-SHA-256.
Return a 32-byte derived key and Err. Iteration counts of one or less perform one iteration.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
password | PackedByteArray | Required | Password bytes used as key-derivation input. |
salt | PackedByteArray | Required | Salt bytes for key derivation; do not substitute the derived key here. |
rounds | int | Required | Number of iterations used by the password-based derivation. |
Return value
PackedByteArray, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
pbkdf2
pbkdf2(hash: String, password: PackedByteArray, salt: PackedByteArray, rounds: int, size: int) -> PackedByteArray, ErrDerive a PBKDF2 key with the selected hash and output length.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
hash | String | Required | Digest algorithm name selected for the operation. |
password | PackedByteArray | Required | Password bytes used as key-derivation input. |
salt | PackedByteArray | Required | Salt bytes for key derivation; do not substitute the derived key here. |
rounds | int | Required | Number of iterations used by the password-based derivation. |
size | int | Required | Requested output length in bytes. |
Return value
PackedByteArray, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
hkdf
hkdf(hash: String, secret: PackedByteArray, salt: PackedByteArray, info: PackedByteArray, size: int) -> PackedByteArray, ErrDerive an HKDF key from a secret, salt, and context information.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
hash | String | Required | Digest algorithm name selected for the operation. |
secret | PackedByteArray | Required | Input key material used by the derivation operation. |
salt | PackedByteArray | Required | Salt bytes for key derivation; do not substitute the derived key here. |
info | PackedByteArray | Required | Application-specific context bytes for key derivation. |
size | int | Required | Requested output length in bytes. |
Return value
PackedByteArray, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
hkdf_extract
hkdf_extract(hash: String, secret: PackedByteArray, salt: PackedByteArray) -> PackedByteArray, ErrExtract an HKDF pseudorandom key from a secret and salt.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
hash | String | Required | Digest algorithm name selected for the operation. |
secret | PackedByteArray | Required | Input key material used by the derivation operation. |
salt | PackedByteArray | Required | Salt bytes for key derivation; do not substitute the derived key here. |
Return value
PackedByteArray, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
hkdf_expand
hkdf_expand(hash: String, key: PackedByteArray, info: PackedByteArray, size: int) -> PackedByteArray, ErrExpand an HKDF key from a pseudorandom key and context information.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
hash | String | Required | Digest algorithm name selected for the operation. |
key | PackedByteArray | Required | Authentication key or pseudorandom key bytes for this operation. |
info | PackedByteArray | Required | Application-specific context bytes for key derivation. |
size | int | Required | Requested output length in bytes. |
Return value
PackedByteArray, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
pbkdf2_sha256_async
pbkdf2_sha256_async(password: PackedByteArray, salt: PackedByteArray, rounds: int) -> await PackedByteArray, ErrRun key derivation on CPU workers.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
password | PackedByteArray | Required | Password bytes used as key-derivation input. |
salt | PackedByteArray | Required | Salt bytes for key derivation; do not substitute the derived key here. |
rounds | int | Required | Number of iterations used by the password-based derivation. |
Return value
await PackedByteArray, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
pbkdf2_async
pbkdf2_async(hash: String, password: PackedByteArray, salt: PackedByteArray, rounds: int, size: int) -> await PackedByteArray, ErrDispatch PBKDF2 with the selected hash to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
hash | String | Required | Digest algorithm name selected for the operation. |
password | PackedByteArray | Required | Password bytes used as key-derivation input. |
salt | PackedByteArray | Required | Salt bytes for key derivation; do not substitute the derived key here. |
rounds | int | Required | Number of iterations used by the password-based derivation. |
size | int | Required | Requested output length in bytes. |
Return value
await PackedByteArray, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
hkdf_async
hkdf_async(hash: String, secret: PackedByteArray, salt: PackedByteArray, info: PackedByteArray, size: int) -> await PackedByteArray, ErrDispatch HKDF key derivation to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
hash | String | Required | Digest algorithm name selected for the operation. |
secret | PackedByteArray | Required | Input key material used by the derivation operation. |
salt | PackedByteArray | Required | Salt bytes for key derivation; do not substitute the derived key here. |
info | PackedByteArray | Required | Application-specific context bytes for key derivation. |
size | int | Required | Requested output length in bytes. |
Return value
await PackedByteArray, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
hkdf_extract_async
hkdf_extract_async(hash: String, secret: PackedByteArray, salt: PackedByteArray) -> await PackedByteArray, ErrDispatch HKDF extraction to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
hash | String | Required | Digest algorithm name selected for the operation. |
secret | PackedByteArray | Required | Input key material used by the derivation operation. |
salt | PackedByteArray | Required | Salt bytes for key derivation; do not substitute the derived key here. |
Return value
await PackedByteArray, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
hkdf_expand_async
hkdf_expand_async(hash: String, key: PackedByteArray, info: PackedByteArray, size: int) -> await PackedByteArray, ErrDispatch HKDF expansion to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
hash | String | Required | Digest algorithm name selected for the operation. |
key | PackedByteArray | Required | Authentication key or pseudorandom key bytes for this operation. |
info | PackedByteArray | Required | Application-specific context bytes for key derivation. |
size | int | Required | Requested output length in bytes. |
Return value
await PackedByteArray, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
json_encode_async
json_encode_async(value: Variant, opts: Dictionary = { }) -> await PackedByteArray, ErrEncode a value as strict JSON UTF-8 bytes.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
value | Variant | Required | Value to serialize. |
opts | Dictionary | { } | Encoding options for formatting and validation. |
Return value
await PackedByteArray, Err
UTF-8 encoded JSON bytes.
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
Unsupported or cyclic values and non-finite numbers return Err.
Non-finite numbers, unsupported types, and cycles fail instead of becoming ambiguous values.
Options: deterministic and escape_html are bool; max_bytes and max_depth are int. A wrong type returns Err.INVALID_DATA, and exceeding a limit returns Err.LIMITED.
Keep the input Arrays, Dictionaries, and their children unchanged until json_encode_async() finishes. The options dictionary is copied at the start.
See also
json_decode_async
json_decode_async(data: PackedByteArray) -> await Variant, ErrDecode bytes as strict JSON.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | PackedByteArray | Required | UTF-8 JSON input bytes. |
Return value
await Variant, Err
Parsed value; a successful null is distinct from a parse failure.
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
Malformed JSON or invalid input encoding returns Err.
Invalid UTF-8 and duplicate names fail. An integer within the signed 64-bit range stays int; fractions, exponents, and out-of-range values become float. \u0000 in strings and keys is preserved.
See also
msgpack_async
msgpack_async(value: Variant) -> await PackedByteArray, ErrDispatch MessagePack encoding to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
value | Variant | Required | Structured value to serialize into the selected data format. |
Return value
await PackedByteArray, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
unmsgpack_async
unmsgpack_async(data: PackedByteArray) -> await Variant, ErrDispatch MessagePack decoding to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | PackedByteArray | Required | Input data in the representation shown by the parameter type. |
Return value
await Variant, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
cbor_async
cbor_async(value: Variant) -> await PackedByteArray, ErrDispatch CBOR encoding to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
value | Variant | Required | Structured value to serialize into the selected data format. |
Return value
await PackedByteArray, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
uncbor_async
uncbor_async(data: PackedByteArray) -> await Variant, ErrDispatch CBOR decoding to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | PackedByteArray | Required | Input data in the representation shown by the parameter type. |
Return value
await Variant, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
sha224_async
sha224_async(msg: PackedByteArray) -> await PackedByteArrayDispatch SHA-224 hashing to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
msg | PackedByteArray | Required | Bytes to hash or authenticate. |
Return value
await PackedByteArray
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
sha256_async
sha256_async(msg: PackedByteArray) -> await PackedByteArrayDispatch SHA-256 hashing to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
msg | PackedByteArray | Required | Bytes to hash or authenticate. |
Return value
await PackedByteArray
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
sha384_async
sha384_async(msg: PackedByteArray) -> await PackedByteArrayDispatch SHA-384 hashing to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
msg | PackedByteArray | Required | Bytes to hash or authenticate. |
Return value
await PackedByteArray
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
sha512_async
sha512_async(msg: PackedByteArray) -> await PackedByteArrayDispatch SHA-512 hashing to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
msg | PackedByteArray | Required | Bytes to hash or authenticate. |
Return value
await PackedByteArray
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
sha3_224_async
sha3_224_async(msg: PackedByteArray) -> await PackedByteArrayDispatch SHA3-224 hashing to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
msg | PackedByteArray | Required | Bytes to hash or authenticate. |
Return value
await PackedByteArray
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
sha3_256_async
sha3_256_async(msg: PackedByteArray) -> await PackedByteArrayDispatch SHA3-256 hashing to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
msg | PackedByteArray | Required | Bytes to hash or authenticate. |
Return value
await PackedByteArray
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
sha3_384_async
sha3_384_async(msg: PackedByteArray) -> await PackedByteArrayDispatch SHA3-384 hashing to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
msg | PackedByteArray | Required | Bytes to hash or authenticate. |
Return value
await PackedByteArray
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
sha3_512_async
sha3_512_async(msg: PackedByteArray) -> await PackedByteArrayDispatch SHA3-512 hashing to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
msg | PackedByteArray | Required | Bytes to hash or authenticate. |
Return value
await PackedByteArray
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
sha1_async
sha1_async(msg: PackedByteArray) -> await PackedByteArrayDispatch SHA-1 hashing to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
msg | PackedByteArray | Required | Bytes to hash or authenticate. |
Return value
await PackedByteArray
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
hmac_async
hmac_async(hash: String, key: PackedByteArray, msg: PackedByteArray) -> await PackedByteArray, ErrDispatch HMAC with the selected hash to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
hash | String | Required | Digest algorithm name selected for the operation. |
key | PackedByteArray | Required | Authentication key or pseudorandom key bytes for this operation. |
msg | PackedByteArray | Required | Bytes to hash or authenticate. |
Return value
await PackedByteArray, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
hmac_sha256_async
hmac_sha256_async(key: PackedByteArray, msg: PackedByteArray) -> await PackedByteArrayDispatch HMAC-SHA-256 to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
key | PackedByteArray | Required | Authentication key or pseudorandom key bytes for this operation. |
msg | PackedByteArray | Required | Bytes to hash or authenticate. |
Return value
await PackedByteArray
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
hex_encode_async
hex_encode_async(data: PackedByteArray) -> await StringDispatch hexadecimal encoding to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | PackedByteArray | Required | Input data in the representation shown by the parameter type. |
Return value
await String
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
hex_decode_async
hex_decode_async(text: String) -> await PackedByteArray, ErrDispatch hexadecimal decoding to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
text | String | Required | Text to inspect, decode or transform; the input is not modified in place. |
Return value
await PackedByteArray, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
base64_encode_async
base64_encode_async(data: PackedByteArray) -> await StringDispatch Base64 encoding to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | PackedByteArray | Required | Input data in the representation shown by the parameter type. |
Return value
await String
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
base64_decode_async
base64_decode_async(text: String, raw: bool = false) -> await PackedByteArray, ErrDispatch Base64 decoding to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
text | String | Required | Text to inspect, decode or transform; the input is not modified in place. |
raw | bool | false | Whether unpadded input is decoded using the raw alphabet form. |
Return value
await PackedByteArray, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
base64url_encode_async
base64url_encode_async(data: PackedByteArray) -> await StringDispatch URL-safe Base64 encoding to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | PackedByteArray | Required | Input data in the representation shown by the parameter type. |
Return value
await String
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
base64url_decode_async
base64url_decode_async(text: String, raw: bool = true) -> await PackedByteArray, ErrDispatch URL-safe Base64 decoding to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
text | String | Required | Text to inspect, decode or transform; the input is not modified in place. |
raw | bool | true | Whether to decode an unpadded representation. |
Return value
await PackedByteArray, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
base32_encode_async
base32_encode_async(data: PackedByteArray) -> await StringDispatch Base32 encoding to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | PackedByteArray | Required | Input data in the representation shown by the parameter type. |
Return value
await String
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
base32_decode_async
base32_decode_async(text: String, raw: bool = false) -> await PackedByteArray, ErrDispatch Base32 decoding to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
text | String | Required | Text to inspect, decode or transform; the input is not modified in place. |
raw | bool | false | Whether to decode an unpadded representation. |
Return value
await PackedByteArray, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
concat_async
concat_async(parts: Array) -> await PackedByteArrayDispatch byte-sequence concatenation to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
parts | Array | Required | Components assembled by the operation, in the representation shown by the type. |
Return value
await PackedByteArray
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
equals_async
equals_async(a: PackedByteArray, b: PackedByteArray) -> await boolDispatch byte-sequence equality checks to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
a | PackedByteArray | Required | First input or comparison operand. |
b | PackedByteArray | Required | Second input or comparison operand. |
Return value
await bool
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
includes_async
includes_async(hay: PackedByteArray, needle: PackedByteArray) -> await boolDispatch byte-subsequence searches to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
hay | PackedByteArray | Required | Byte sequence searched for the requested pattern. |
needle | PackedByteArray | Required | Byte pattern to find in the searched sequence. |
Return value
await bool
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
index_of_async
index_of_async(hay: PackedByteArray, needle: PackedByteArray, from: int = 0) -> await intDispatch first byte-subsequence searches to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
hay | PackedByteArray | Required | Byte sequence searched for the requested pattern. |
needle | PackedByteArray | Required | Byte pattern to find in the searched sequence. |
from | int | 0 | Starting point used by the operation. |
Return value
await int
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
last_index_of_async
last_index_of_async(hay: PackedByteArray, needle: PackedByteArray) -> await intDispatch last byte-subsequence searches to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
hay | PackedByteArray | Required | Byte sequence searched for the requested pattern. |
needle | PackedByteArray | Required | Byte pattern to find in the searched sequence. |
Return value
await int
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
starts_with_async
starts_with_async(hay: PackedByteArray, prefix: PackedByteArray) -> await boolDispatch byte-prefix comparison to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
hay | PackedByteArray | Required | Byte sequence searched for the requested pattern. |
prefix | PackedByteArray | Required | Prefix applied when constructing the resulting names, paths or output. |
Return value
await bool
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
ends_with_async
ends_with_async(hay: PackedByteArray, suffix: PackedByteArray) -> await boolDispatch byte-suffix comparison to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
hay | PackedByteArray | Required | Byte sequence searched for the requested pattern. |
suffix | PackedByteArray | Required | Suffix to test or remove from the end of the input. |
Return value
await bool
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
repeat_async
repeat_async(src: PackedByteArray, times: int) -> await PackedByteArrayDispatch byte repetition to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | PackedByteArray | Required | Source input to read or transform; file operations interpret it as a source path. |
times | int | Required | Number of repetitions of the input sequence. |
Return value
await PackedByteArray
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
fit_async
fit_async(src: PackedByteArray, size: int) -> await PackedByteArrayDispatch byte-sequence resizing to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | PackedByteArray | Required | Source input to read or transform; file operations interpret it as a source path. |
size | int | Required | Requested output length in bytes. |
Return value
await PackedByteArray
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
split_async
split_async(src: PackedByteArray, sep: PackedByteArray) -> await ArrayDispatch byte-sequence splitting to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | PackedByteArray | Required | Source input to read or transform; file operations interpret it as a source path. |
sep | PackedByteArray | Required | Separator used to split or join records or fields. |
Return value
await Array
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
xor_bytes_async
xor_bytes_async(a: PackedByteArray, b: PackedByteArray) -> await PackedByteArrayDispatch bytewise exclusive OR to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
a | PackedByteArray | Required | First input or comparison operand. |
b | PackedByteArray | Required | Second input or comparison operand. |
Return value
await PackedByteArray
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
equal_ct_async
equal_ct_async(a: PackedByteArray, b: PackedByteArray) -> await boolDispatch constant-time comparison to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
a | PackedByteArray | Required | First input or comparison operand. |
b | PackedByteArray | Required | Second input or comparison operand. |
Return value
await bool
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
csv_async
csv_async(src: String, sep: String = ",") -> await Array, ErrDispatch in-memory format conversion to CPU workers.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | String | Required | Source input to read or transform; file operations interpret it as a source path. |
sep | String | "," | Separator used to split or join records or fields. |
Return value
await Array, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
to_csv_async
to_csv_async(rows: Array, sep: String = ",") -> await StringDispatch CSV encoding to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
rows | Array | Required | Rows in input order. Batch database calls use one parameter set per row. |
sep | String | "," | Separator used to split or join records or fields. |
Return value
await String
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
csv_objects_async
csv_objects_async(src: String, sep: String = ",") -> await Array, ErrDispatch object CSV parsing to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | String | Required | Source input to read or transform; file operations interpret it as a source path. |
sep | String | "," | Separator used to split or join records or fields. |
Return value
await Array, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
to_csv_objects_async
to_csv_objects_async(items: Array, sep: String = ",") -> await StringDispatch object CSV encoding to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
items | Array | Required | Input elements to transform or collect, in their supplied order. |
sep | String | "," | Separator used to split or join records or fields. |
Return value
await String
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
ini_async
ini_async(src: String) -> await Dictionary, ErrDispatch INI parsing to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | String | Required | Source input to read or transform; file operations interpret it as a source path. |
Return value
await Dictionary, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
to_ini_async
to_ini_async(data: Dictionary) -> await StringDispatch INI encoding to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | Dictionary | Required | Input data in the representation shown by the parameter type. |
Return value
await String
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
toml_async
toml_async(src: String) -> await Dictionary, ErrDispatch TOML parsing to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | String | Required | Source input to read or transform; file operations interpret it as a source path. |
Return value
await Dictionary, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
to_toml_async
to_toml_async(data: Dictionary, prefix: String = "") -> await String, ErrDispatch TOML encoding to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | Dictionary | Required | Input data in the representation shown by the parameter type. |
prefix | String | "" | Table path prefix prepended to encoded tables. |
Return value
await String, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
yaml_async
yaml_async(src: String) -> await Variant, ErrDispatch YAML parsing to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | String | Required | Source input to read or transform; file operations interpret it as a source path. |
Return value
await Variant, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
to_yaml_async
to_yaml_async(data: Variant, depth: int = 0) -> await String, ErrDispatch YAML encoding to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | Variant | Required | Input data in the representation shown by the parameter type. |
depth | int | 0 | Initial nesting or indentation depth for serialization. |
Return value
await String, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
jsonc_async
jsonc_async(src: String) -> await Variant, ErrDispatch commented JSON parsing to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | String | Required | Source input to read or transform; file operations interpret it as a source path. |
Return value
await Variant, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
strip_jsonc_async
strip_jsonc_async(src: String) -> await StringDispatch JSON comment stripping to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | String | Required | Source input to read or transform; file operations interpret it as a source path. |
Return value
await String
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
jsonl_async
jsonl_async(src: String) -> await Array, ErrDispatch JSON Lines parsing to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | String | Required | Source input to read or transform; file operations interpret it as a source path. |
Return value
await Array, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
to_jsonl_async
to_jsonl_async(items: Array) -> await String, ErrDispatch JSON Lines encoding to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
items | Array | Required | Input elements to transform or collect, in their supplied order. |
Return value
await String, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
front_matter_async
front_matter_async(src: String) -> await Dictionary, ErrDispatch front-matter parsing to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | String | Required | Source input to read or transform; file operations interpret it as a source path. |
Return value
await Dictionary, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
to_front_matter_async
to_front_matter_async(attrs: Dictionary, body: String, kind: String = "yaml") -> await String, ErrDispatch front-matter encoding to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
attrs | Dictionary | Required | Named attributes to encode in markup or document metadata. |
body | String | Required | Content to write or include in the response. |
kind | String | "yaml" | Metadata format: yaml, toml or json. |
Return value
await String, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
xml_async
xml_async(src: String) -> await Dictionary, ErrDispatch XML parsing to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | String | Required | Source input to read or transform; file operations interpret it as a source path. |
Return value
await Dictionary, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
to_xml_async
to_xml_async(data: Dictionary, indent: int = 0) -> await String, ErrDispatch XML encoding to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | Dictionary | Required | Input data in the representation shown by the parameter type. |
indent | int | 0 | Number of spaces per indentation level. |
Return value
await String, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
env_async
env_async(src: String) -> await Dictionary, ErrDispatch dotenv parsing to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
src | String | Required | Source input to read or transform; file operations interpret it as a source path. |
Return value
await Dictionary, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
to_env_async
to_env_async(data: Dictionary) -> await String, ErrDispatch dotenv encoding to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | Dictionary | Required | Input data in the representation shown by the parameter type. |
Return value
await String, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
tar_async
tar_async(entries: Array) -> await PackedByteArray, ErrDispatch tar encoding to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
entries | Array | Required | Archive entries containing their names and content. |
Return value
await PackedByteArray, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
untar_async
untar_async(data: PackedByteArray) -> await Array, ErrDispatch tar decoding to a CPU worker.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | PackedByteArray | Required | Input data in the representation shown by the parameter type. |
Return value
await Array, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.