Erlang -- edoc_layout_chunks

EDoc

Reference Manual

Version 1.0

- User's Guide
- Reference Manual
- Release Notes
- PDF
- Top

- Expand All
- Contract All

### Table of Contents

- edoc
  - Top of manual page
  - application/1
  - application/2
  - application/3
  - file/1
  - file/2
  - files/1
  - files/2
  - get_doc/1
  - get_doc/2
  - get_doc/3
  - layout/1
  - layout/2
  - read/1
  - read/2
  - read_comments/1
  - read_comments/2
  - read_source/1
  - read_source/2
  - run/2
- edoc_cmd
- edoc_doclet
  - Top of manual page
  - run/2
- edoc_doclet_chunks
  - Top of manual page
  - run/2
- edoc_extract
  - Top of manual page
  - file/4
  - header/3
  - header/4
  - header/5
  - source/3
  - source/4
  - source/5
  - text/4
- edoc_layout
  - Top of manual page
  - module/2
  - overview/2
  - type/1
- edoc_layout_chunks
  - Top of manual page
  - module/2
- edoc_lib
  - Top of manual page
  - get_doc_env/3
  - infer_module_app/1
  - write_file/4
- edoc_run
  - Top of manual page
  - application/1
  - file/1
  - files/1

# edoc_layout_chunks

### Module

edoc_layout_chunks

### Module Summary

Convert EDoc module documentation to an EEP-48 docs_v1 chunk.

### Description

Convert EDoc module documentation to an EEP-48 docs_v1 chunk.

This layout is only expected to work with edoc_doclet_chunks. Section Using the EDoc API in the EDoc User's Guide shows an example of using this module.

This module breaks the convention stated in edoc_doclet to not rely on edoc.hrl in doclets and layouts. It uses #entry{} records directly to recover information that is not otherwise available to layouts.

### DATA TYPES

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()]}

  The Docs v1 chunk according to EEP 48.

docs_v1_entry() = {_KindNameArity::{atom(), atom(), arity()}, _Anno::erl_anno:anno(), _Signature::signature(), _Doc::doc(), _Metadata::metadata()}

  A tuple equivalent to the #docs_v1_entry{} record, but with the record name field skipped.

metadata() = map()

mime_type() = binary()

signature() = [binary()]

### Exports

module(Doc::edoc:edoc_module(), Options::proplists:proplist()) -> binary() |

Convert EDoc module documentation to an EEP-48 style doc chunk.

### See also

edoc_doclet_chunks, shell_docs(3)

Radek Szymczyszyn lavrin@gmail.com