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: tilemap.rs
    path of file: ./repos/pyxel/crates/pyxel-engine/src
    
    the code of the file until where you have to start completion: use crate::canvas::{Canvas, ToIndex};
use crate::image::SharedImage;
use crate::utils::{f64_to_u32, parse_hex_string, simplify_string};

pub type TileCoord = u8;
pub type Tile = (TileCoord, TileCoord);

impl ToIndex for Tile {
    fn to_index(&self) -> usize {
        0
    }
}

#[deri
    
    pub fn load(&mut self, x: i32, y: i32, filename: &str, layer_index: u32) {
        let tilemap = Self::from_tmx(filename, layer_index);
        let tilemap_width = tilemap.lock().width();
        let tilemap_height = tilemap.lock().height();
        self.blt(
            x as f64,
            y as f64,
            tilemap,
            0.0,
            0.0,
            tilemap_width as f64,
            tilemap_height as f64,
            None,
        );
    }