edoc_layout_chunks(3erl)
π NAME π
okay so this is edoc_layout_chunks(3erl) β the Erlang Module Definition manual, bestie. and the name says it all:
edoc_layout_chunks β convert EDoc module documentation to an EEP-48 docs_v1 chunk. periodt. π
π DESCRIPTION π
Convert EDoc module documentation to an EEP-48 docs_v1 chunk. that's the whole main character job, no cap.
This layout is only expected to work with edoc_doclet_chunks β like, that's its ride-or-die. the section Using the EDoc API in the EDoc User's Guide shows an example of using this module, so go peek if you want the visual, iykyk. π¦
Also important: this module breaks the convention stated in edoc_doclet to not rely on edoc.hrl in doclets and layouts. yes, it's a lil rebel π
. it uses #entry{} records directly to recover information that is not otherwise available to layouts. iconic behavior, honestly. β¨
π DATA TYPES π
vibe check: here are all the data types, no skipping, fr fr:
beam_language() = atom():
doc() = #{doc_language() => doc_string()} | none | hidden:
doc_language() = binary():
doc_string() = binary():
docs_v1() = #docs_v1{anno=erl_anno:anno(),
beam_language=beam_language(), format=mime_type(), module_doc=doc(),
metadata=metadata(), docs=[docs_v1_entry()]}:
docs_v1_entry() = {_KindNameArity::{atom(), atom(), arity()},
_Anno::erl_anno:anno(), _Signature::signature(), _Doc::doc(),
_Metadata::metadata()}:
metadata() = map():
mime_type() = binary():
signature() = [binary()]:
quick translations, because yes:
docs_v1()is literally the Docs v1 chunk according to EEP 48. πdocs_v1_entry()is a tuple equivalent to the#docs_v1_entry{}record, but with the record name field skipped. slay.
π¦ EXPORTS π¦
one export, and it's doing the thing:
module(Doc::edoc:edoc_module(), Options::proplists:proplist()) ->
binary()
moduleβ convert EDoc module documentation to an EEP-48 style doc chunk. that's it, that's the function. β¨
π SEE ALSO π
go read these next, bestie:
edoc_doclet_chunksshell_docs(3erl)
π AUTHORS π
Radek Szymczyszyn <lavrin@gmail.com>π
okay bye bestie π«Ά β footer vibes: source/version is edoc 1.2, manual tag is edoc_layout_chunks(3erl), and the footer didn't give us a date, so we're not inventing one. periodt. π
π¦ where this page comes from
- debian bookworm: erlang-manpages 1:25.2.3+dfsg-1+deb12u1 Β· Apache-2.0
- debian bookworm: erlang-manpages 1:25.2.3+dfsg-1+deb12u4 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4.8 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms