Trait Migration

Source
pub trait Migration {
    // Required method
    fn migrate_rev0(&self, userdata: &[u8]) -> Result<(u32, Vec<u8>), String>;
}

Required Methods§

Source

fn migrate_rev0(&self, userdata: &[u8]) -> Result<(u32, Vec<u8>), String>

Migration of a revision 0 header.

You you have a revision 0 header, then this function is called. You must extract the top-id from the given userdata record. The concept of userdata was removed with the revision 1. The top-id is directly stored in the header.

On success the extracted top-id should be returned, otherwise return an error-description.

Implementors§