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

use std::fmt::Debug;
use std::io::Error as IOError;
use std::mem;
use std::num::Wrapping;
use std::os::unix::io::RawFd;
use std::sync::atomic::Ordering;

use utils::syscall::SyscallReturnCode;
use vm_memory::{VolatileMemory, VolatileMemoryError};

use super::mmap::{mmap, MmapError};
use crate::io_uring::bindings;
use crate::io_uring::operation::Sqe;
use crate::vstate::memory::{Bytes, MmapRegion};

#[derive(Debug, thiserror::Error, displaydoc::Display)]
/// SQueue Error.
pub enum SQueueError {
    /// The queue is full.
    FullQueue,
    /// Error mapping the ring: {0}
    Mmap(#[from] MmapError),
 
    
    pub(crate) fn push(&mut self, sqe: Sqe) -> Result<(), (SQueueError, u64)> {
        let ring_slice = self.ring.as_volatile_slice();

        // get the sqe tail
        let tail = self.unmasked_tail.0 & self.ring_mask;

        // get the pending sqes
        let pending = match self.pending() {
            Ok(n) => n,
            Err(err) => return Err((err, sqe.user_data())),
        };

        if pending >= self.count {
            return Err((SQueueError::FullQueue, sqe.user_data()));
        }

        // retrieve and populate the sqe
        if let Err(err) = self.sqes.as_volatile_slice().write_obj(
            sqe.0,
            (tail as usize) * mem::size_of::<bindings::io_uring_sqe>(),
        ) {
            return Err((SQueueError::VolatileMemory(err), sqe.user_data()));
        }

        // increment the sqe tail
        self.unmasked_tail += Wrapping(1u32);

        if let Err(err) = ring_slice.store(self.unmasked_tail.0, self.tail_off, Ordering::Release) {
            return Err((SQueueError::VolatileMemory(err), sqe.user_data()));
        }

        // This is safe since we already checked if there is enough space in the queue;
        self.to_submit += 1;

        Ok(())
    }