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: texture2d_array.rs
    path of file: ./repos/three-d/src/core/texture
    
    the code of the file until where you have to start completion: use crate::core::texture::*;

///
/// A array of 2D color textures that can be rendered into.
///
/// **Note:** [DepthTest] is disabled if not also writing to a [DepthTarget].
/// Use a [RenderTarget] to write to both color and depth.
///
pub struct Texture2DArray {
    context: Context,
    id: crate::context::Texture,
    width: u32,
    height: u32,
    depth: u32,
    number_of_mip_maps: u32,
    data_byte_size: usize,
}

impl Texture2DArray {
    ///
    /// Creates a new texture array from the given [CpuTexture]s.
    /// All of the cpu textures must contain data with the same [TextureDataType] and the same width and height.
    ///
    /// **Note:** Mip maps will not be generated for RGB16F and RGB32F format, even if `mip_map_filter` is specified.
    ///
    pub fn new(context: &Context, cpu_textures: &[&CpuTexture]) -> Self {
        let cpu_texture = cpu_textures
            .get(0)
            .expect("Expect at least one texture in a texture array");
        match &cpu_texture.data {
            TextureData::RU8(_) => Self::new_with_data(
                context,
                cpu_texture,
                &cpu_textures.iter().map(|t| ru8_data(t)).collect::<Vec<_>>(),
            ),
            TextureData::RgU8(_) => Self::new_with_data(
                context,
                cpu_texture,
                &cpu_textures
                    .iter()
                    .map(|t| rgu8_data(t))
                    .collect::<Vec<_>>(),
            ),
            TextureData::RgbU8(_) => Self::new_with_data(
                context,
                cpu_texture,
                &cpu_textures
                    .iter()
                    .map(|t| rgbu8_data(t))
                    .collect::<Vec<_>>(),
            ),
            TextureData::RgbaU8(_) => Self::new_with_data(
                context,
                cpu_texture,
                &cpu_textures
                    .iter()
                    .map(|t| rgbau8_data(t))
                    .collect::<Vec<_>>(),
            ),
            TextureData::RF16(_) => Self::new_with_data(
                context,
                cpu_texture,
                &cpu_textures
                    .iter()
                    .map(|t| rf16_data(t))
                    .collect::<Vec<_>>(),
            ),
            TextureData::RgF16(_) => Self::new_with_data(
                context,
                cpu_texture,
                &cpu_textures
                    .iter()
                    .map(|t| rgf16_data(t))
                    .collect::<Vec<_>>(),
            ),
            TextureData::RgbF16(_) => Self::new_with_data(
                context,
                cpu_texture,
                &cpu_textures
                    .iter()
                    .map(|t| rgbf16_data(t))
                    .collect::<Vec<_>>(),
            ),
            TextureData::RgbaF16(_) => Self::new_with_data(
                context,
                cpu_texture,
            
    
    pub fn new(context: &Context, cpu_textures: &[&CpuTexture]) -> Self {
        let cpu_texture = cpu_textures
            .get(0)
            .expect("Expect at least one texture in a texture array");
        match &cpu_texture.data {
            TextureData::RU8(_) => Self::new_with_data(
                context,
                cpu_texture,
                &cpu_textures.iter().map(|t| ru8_data(t)).collect::<Vec<_>>(),
            ),
            TextureData::RgU8(_) => Self::new_with_data(
                context,
                cpu_texture,
                &cpu_textures
                    .iter()
                    .map(|t| rgu8_data(t))
                    .collect::<Vec<_>>(),
            ),
            TextureData::RgbU8(_) => Self::new_with_data(
                context,
                cpu_texture,
                &cpu_textures
                    .iter()
                    .map(|t| rgbu8_data(t))
                    .collect::<Vec<_>>(),
            ),
            TextureData::RgbaU8(_) => Self::new_with_data(
                context,
                cpu_texture,
                &cpu_textures
                    .iter()
                    .map(|t| rgbau8_data(t))
                    .collect::<Vec<_>>(),
            ),
            TextureData::RF16(_) => Self::new_with_data(
                context,
                cpu_texture,
                &cpu_textures
                    .iter()
                    .map(|t| rf16_data(t))
                    .collect::<Vec<_>>(),
            ),
            TextureData::RgF16(_) => Self::new_with_data(
                context,
                cpu_texture,
                &cpu_textures
                    .iter()
                    .map(|t| rgf16_data(t))
                    .collect::<Vec<_>>(),
            ),
            TextureData::RgbF16(_) => Self::new_with_data(
                context,
                cpu_texture,
                &cpu_textures
                    .iter()
                    .map(|t| rgbf16_data(t))
                    .collect::<Vec<_>>(),
            ),
            TextureData::RgbaF16(_) => Self::new_with_data(
                context,
                cpu_texture,
                &cpu_textures
                    .iter()
                    .map(|t| rgbaf16_data(t))
                    .collect::<Vec<_>>(),
            ),
            TextureData::RF32(_) => Self::new_with_data(
                context,
                cpu_texture,
                &cpu_textures
                    .iter()
                    .map(|t| rf32_data(t))
                    .collect::<Vec<_>>(),
            ),
            TextureData::RgF32(_) => Self::new_with_data(
                context,
                cpu_texture,
                &cpu_textures
                    .iter()
                    .map(|t| rgf32_data(t))
                    .collect::<Vec<_>>(),
            ),
            TextureData::RgbF32(_) => Self::new_with_data(
                context,
                cpu_texture,
                &cpu_textures
                    .iter()
                    .map(|t| rgbf32_data(t))
                    .collect::<Vec<_>>(),
            ),
            TextureData::RgbaF32(_) => Self::new_with_data(
                context,
                cpu_texture,
                &cpu_textures
                    .iter()
                    .map(|t| rgbaf32_data(t))
                    .collect::<Vec<_>>(),
            ),
        }
    }