Current section
Files
Jump to
Current section
Files
src/postgleam@codec.erl
-module(postgleam@codec).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]).
-define(FILEPATH, "src/postgleam/codec.gleam").
-export_type([format/0, codec/0, codec_matcher/0]).
-type format() :: binary | text.
-type codec() :: {codec,
binary(),
integer(),
format(),
fun((postgleam@value:value()) -> {ok, bitstring()} | {error, binary()}),
fun((bitstring()) -> {ok, postgleam@value:value()} | {error, binary()})}.
-type codec_matcher() :: {codec_matcher,
binary(),
list(integer()),
gleam@option:option(binary()),
format(),
fun((integer()) -> codec())}.