pub fn write_key<W: Write>(
writer: &mut W,
key: &Key,
) -> Result<(), KeyBinaryError>Expand description
Writes a KEY index to a writer.
§Errors
KeyBinaryError::InvalidData when a BIF filename holds a NUL, which the
null-terminated filename table cannot represent.
KeyBinaryError::ValueOverflow when either count, a table offset or
size, or a filename’s on-disk length will not fit its field, naming which.
The filename length is a u16, so it is the narrowest of these.
KeyBinaryError::TextEncoding when a filename has no form in the KEY’s
encoding, and KeyBinaryError::Io when the writer fails, which can leave
a partial file.