Skip to main content

Module layout

Module layout 

Source
Expand description

Scanning an ASDF file’s overall structure.

The layout is, in order: a #ASDF header line, optional comment lines, an optional YAML tree, zero or more binary blocks, and an optional block index. The tree’s length is deliberately not recorded anywhere, so that it can be edited by hand; readers find its end by searching for the document end marker.

Structs§

BlockLocation
Where a block lives in the file.
Layout
The result of scanning a file.

Enums§

IndexRejection
Why a block index was rejected.

Constants§

ASDF_HEADER_PREFIX
The token every ASDF file starts with.
ASDF_STANDARD_PREFIX
The comment that records the ASDF Standard version.
BLOCK_INDEX_HEADER
The line that introduces the block index.
YAML_DIRECTIVE_PREFIX
The prefix of the YAML version directive.
YAML_DOCUMENT_END_MARKER
The YAML document end marker, including its leading newline.

Functions§

scan
Scan an in-memory ASDF file.
write_block_index
Render a block index for a set of blocks, as written at the end of a file.