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: mod.rs
    path of file: ./repos/aero/src/aero_kernel/src/drivers/block/nvme
    
    the code of the file until where you have to start completion: // Copyright (C) 2021-2024 The Aero Project Developers.
//
// This file is part of The Aero Project.
//
// Aero is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Aero is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Aero. If not, see <https://www.gnu.org/licenses/>.

mod command;
mod queue;

use core::mem::MaybeUninit;

use command::*;
use queue::*;

use alloc::sync::Arc;
use alloc::vec::Vec;

use bit_field::BitField;

use crate::arch::interrupts::{self, InterruptStack};
use crat
    
    fn rw_command(&self, opcode: CommandOpcode, sector: usize, start: PhysAddr, size_bytes: usize) {
        assert!(size_bytes != 0);

        let blocks = size_bytes.div_ceil(self.block_size);
        let mut read_cmd = ReadWriteCommand::default();

        read_cmd.opcode = opcode as u8;
        read_cmd.nsid = self.nsid;
        read_cmd.start_lba = sector as u64;
        read_cmd.length = (blocks - 1) as u16;

        if size_bytes > Size4KiB::SIZE as usize {
            // The data cannot fit in 8KiB frames, so we need to use
            // a PRP list.
            let prp_num = ((blocks - 1) * self.block_size) / Size4KiB::SIZE as usize;
            assert!(prp_num < self.max_prps);

            let mut prps = self.prps.lock();

            for i in 0..prp_num {
                prps[i].write((start.as_u64() + Size4KiB::SIZE) + (Size4KiB::SIZE * i as u64));
            }

            read_cmd.data_ptr.prp1 = start.as_u64();
            read_cmd.data_ptr.prp2 = prps.addr().as_u64();
        } else {
            read_cmd.data_ptr.prp1 = start.as_u64();
        }

        self.controller.io_queue.lock().submit_command(read_cmd);
    }