Skip to main content

verify_buffer

Function verify_buffer 

Source
pub fn verify_buffer(
    file_type: FileTypeBin,
    buffer: &[u8],
) -> Result<(), IcechunkFormatError>
Expand description

Check that buffer can be read back as file_type.

Applies exactly the checks the matching from_buffer applies on read, so a buffer that passes here cannot fail to deserialize later. File types that are not flatbuffers have nothing to check.