Current section
Files
Jump to
Current section
Files
src/internal@common@game_index.erl
-module(internal@common@game_index).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export([game_index_version/0, game_index_generation/0]).
-export_type([game_index_version/0, game_index_generation/0]).
-type game_index_version() :: {game_index_version,
integer(),
internal@common@affordance:affordance()}.
-type game_index_generation() :: {game_index_generation,
integer(),
internal@common@affordance:affordance()}.
-spec game_index_version() -> decode:decoder(game_index_version()).
game_index_version() ->
_pipe = decode:into(
(decode:parameter(
fun(Index) ->
decode:parameter(
fun(Version) -> {game_index_version, Index, Version} end
)
end
))
),
_pipe@1 = decode:field(
_pipe,
<<"game_index"/utf8>>,
{decoder, fun gleam@dynamic:int/1}
),
decode:field(
_pipe@1,
<<"version"/utf8>>,
internal@common@affordance:affordance()
).
-spec game_index_generation() -> decode:decoder(game_index_generation()).
game_index_generation() ->
_pipe = decode:into(
(decode:parameter(
fun(Index) ->
decode:parameter(
fun(Generation) ->
{game_index_generation, Index, Generation}
end
)
end
))
),
_pipe@1 = decode:field(
_pipe,
<<"game_index"/utf8>>,
{decoder, fun gleam@dynamic:int/1}
),
decode:field(
_pipe@1,
<<"generation"/utf8>>,
internal@common@affordance:affordance()
).