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: drive.rs
    path of file: ./repos/firecracker/src/vmm/src/vmm_config
    
    the code of the file until where you have to start completion: // Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

use std::collections::VecDeque;
use std::io;
use std::sync::{Arc, Mutex};

use serde::{Deserialize, Serialize};

use super::RateLimiterConfig;
use crate::devices::virtio::block::device::Block;
pub use crate::devices::virtio::block::virtio::device::FileEngineType;
use crate::devices::virtio::block::{BlockError, CacheType};
use crate::VmmError;

/// Errors associated with the operations allowed on a drive.
#[derive(Debug, thiserror::Error, dis
    
    fn test_add_one_root_block_device() {
        let dummy_file = TempFile::new().unwrap();
        let dummy_path = dummy_file.as_path().to_str().unwrap().to_string();

        let dummy_block_device = BlockDeviceConfig {
            drive_id: String::from("1"),
            partuuid: None,
            is_root_device: true,
            cache_type: CacheType::Unsafe,

            is_read_only: Some(true),
            path_on_host: Some(dummy_path),
            rate_limiter: None,
            file_engine_type: None,

            socket: None,
        };

        let mut block_devs = BlockBuilder::new();
        block_devs.insert(dummy_block_device.clone()).unwrap();

        assert!(block_devs.has_root_device());
        assert_eq!(block_devs.devices.len(), 1);
        let block = block_devs.devices[0].lock().unwrap();
        assert_eq!(block.id(), dummy_block_device.drive_id);
        assert_eq!(block.partuuid(), &dummy_block_device.partuuid);
        assert_eq!(block.read_only(), dummy_block_device.is_read_only.unwrap());
    }