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: memory.rs
    path of file: ./repos/juice/coaster/src/frameworks/cuda/api/driver
    
    the code of the file until where you have to start completion: //! Provides the Cuda API with its memory/buffer functionality.

use super::ffi::*;
use super::{Error, API};
use crate::frameworks::cuda::Memory;
use crate::frameworks::native::flatbox
    
    pub fn mem_cpy_h_to_d(host_mem: &FlatBox, device_mem: &mut Memory) -> Result<(), Error> {
        unsafe {
            API::ffi_mem_cpy_h_to_d(
                *device_mem.id_c(),
                host_mem.as_slice().as_ptr(),
                host_mem.byte_size(),
            )
        }
    }