Skip to main content

encode_export_record

Function encode_export_record 

Source
pub fn encode_export_record(record: &ExportRecord) -> Result<Bytes, StoreError>
Expand description

One record’s bytes: partition length (be16, never 0) and Partition::encode bytes, key length (be16) and key, value length (be32) and value. An export is the header, its records, then EXPORT_END.

§Errors

StoreError::Invalid for an unencodable partition or a key or value over the contract limits.