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: web.rs
    path of file: ./repos/gfx/src/backend/gl/src/window
    
    the code of the file until where you have to start completion: use crate::{
    conv, device::Device, native, Backend as B, GlContainer, PhysicalDevice, QueueFamily, Starc,
};
use glow::HasContext;
use hal::{adapter::Adapter, format as f, image, window};
use parking_lot::Mutex;
use std::sync::Arc;
use wasm_bindgen::JsCast;

#[derive(Clone, Debug)]
pub struct Swapchain {
    pub(crate) extent: window::Extent2D,
    pub(crate) channel: f::ChannelType,
    pub(crate) raw_format: native::TextureFormat,
    pub(crate) framebuffer: native::RawFramebuffer,
}

#[derive(Debug)]
pub struct Instance {
    canvas: Mutex<Option<Starc<web_sys::HtmlCanvasElement>>>,
}

impl hal::Instance<B> for Instance {
    fn create(_name: &str, _version: u32) -> Result<Self, hal::UnsupportedBackend> {
        Ok(Instance {
            canvas: Mutex::new(None),
        })
    }

    fn enumerate_adapters(&self) -> Vec<Ada
    
    fn enumerate_adapters(&self) -> Vec<Adapter<B>> {
        let canvas_guard = self.canvas.lock();
        let context = match *canvas_guard {
            Some(ref canvas) => {
                // TODO: Remove hardcoded width/height
                if canvas.get_attribute("width").is_none() {
                    canvas
                        .set_attribute("width", "640")
                        .expect("Cannot set width");
                }
                if canvas.get_attribute("height").is_none() {
                    canvas
                        .set_attribute("height", "480")
                        .expect("Cannot set height");
                }
                let context_options = js_sys::Object::new();
                js_sys::Reflect::set(
                    &context_options,
                    &"antialias".into(),
                    &wasm_bindgen::JsValue::FALSE,
                )
                .expect("Cannot create context options");
                let webgl2_context = canvas
                    .get_context_with_context_options("webgl2", &context_options)
                    .expect("Cannot create WebGL2 context")
                    .and_then(|context| context.dyn_into::<web_sys::WebGl2RenderingContext>().ok())
                    .expect("Cannot convert into WebGL2 context");
                glow::Context::from_webgl2_context(webgl2_context)
            }
            None => return Vec::new(),
        };

        let adapter = PhysicalDevice::new_adapter(context);
        vec![adapter]
    }