pub fn read_key_from_bytes_with_options(
bytes: &[u8],
options: KeyReadOptions,
) -> Result<Key, KeyBinaryError>Expand description
Reads a KEY index from bytes with explicit options.
§Errors
KeyBinaryError::InvalidMagic when the signature is not KEY , and
KeyBinaryError::InvalidVersion for a version options.input does not
accept: CanonicalK1 takes V1 alone, where
CompatibilityAurora also
takes V1.1.
KeyBinaryError::InvalidHeader when the header is truncated, either
table’s size overflows, or a table or a BIF filename runs past the end of
bytes. KeyBinaryError::TextDecoding for a BIF filename that is not
valid text in the KEY’s encoding.
The BIFs a KEY names are not opened, so a KEY pointing at files that are not on disk reads without complaint. That failure arrives at first lookup instead.