Current section

Files

Jump to
tallgrass src internal@common@description.erl
Raw

src/internal@common@description.erl

-module(internal@common@description).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export([description/0]).
-export_type([description/0]).
-type description() :: {description,
binary(),
internal@common@affordance:affordance()}.
-spec description() -> decode:decoder(description()).
description() ->
_pipe = decode:into(
(decode:parameter(
fun(Text) ->
decode:parameter(
fun(Language) -> {description, Text, Language} end
)
end
))
),
_pipe@1 = decode:field(
_pipe,
<<"description"/utf8>>,
{decoder, fun gleam@dynamic:string/1}
),
decode:field(
_pipe@1,
<<"language"/utf8>>,
internal@common@affordance:affordance()
).