Skip to main content

upgrade

Function upgrade 

Source
pub fn upgrade(bytes: &[u8]) -> Result<Vec<u8>, DecodeError>
Expand description

A document of version 1 or 2 as a version 2 one: what reading an old file and saving it again does. Nothing is lost: the value read is the value written, and every value version 1 holds has a version 2 form (a crate::Stream is the list of its items, as it is read anywhere without a schema).

§Errors

DecodeError when the bytes aren’t the binary form; nothing is written then.