You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: restore.rs
    path of file: ./repos/diem/storage/backup/backup-cli/src/backup_types/transaction
    
    the code of the file until where you have to start completion: // Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0

use crate::{
    backup_types::{
        epoch_ending::restore::EpochHistory,
        transaction::manifest::{TransactionBackup, TransactionChunk},
    },
    metrics::{
        restore::{TRANSACTION_REPLAY_VERSION, TRANSACTION_SAVE_VERSION},
        verify::VERIFY_TRANSACTION_VERSION,
    },
    storage::{BackupStorage, FileHandle},
    utils::{
        read_record_bytes::ReadRecordBytes, storage_ext::BackupStorageExt, stream::StreamX,
        GlobalRestoreOptions, RestoreRunMode,
    },
};
use anyhow::{anyhow, bail, ensure, Result};
use diem_logger::prelude::*;
use diem_types::{
    contract
    
    async fn preheat_impl(&mut self) -> Result<TransactionRestorePreheatData> {
        let manifest: TransactionBackup =
            self.storage.load_json_file(&self.manifest_handle).await?;
        manifest.verify()?;

        let mut loaded_chunks = Vec::new();
        for chunk_manifest in &manifest.chunks {
            if chunk_manifest.first_version > self.target_version {
                break;
            }

            loaded_chunks.push(
                LoadedChunk::load(
                    chunk_manifest.clone(),
                    &self.storage,
                    self.epoch_history.as_ref(),
                )
                .await?,
            )
        }

        Ok(TransactionRestorePreheatData {
            manifest,
            loaded_chunks,
        })
    }