pub fn encode(map: &KeyMap, type_tag: u8) -> Result<Payload>Expand description
Writes a key map’s payload.
type_tag is the column’s logical type as the format numbers it. It is passed in rather than
derived because the mapping from a logical type to a tag belongs to the format, and this crate
sits below the format on purpose. Section 3.3 wants it in the header so that a section is
self describing: a tool reading a payload out of a file can say what column it was built
against without holding the directory as well.
§Errors
If a length does not fit the width the layout gives it, which means a key map larger than the format can name.