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: lib.rs
    path of file: ./repos/Sophon/modules/pl011/src
    
    the code of the file until where you have to start completion: #![feature(format_args_nl)]
#![feature(default_alloc_er
    
    fn init(&'static mut self) -> anyhow::Result<()> {
        let devtree = SERVICE.get_device_tree().unwrap();
        let node = devtree.compatible("arm,pl011").unwrap();
        let uart_frame = node.translate(node.regs().unwrap().next().unwrap().start);
        let uart_page = SERVICE.map_device_page(Frame::new(uart_frame));
        let uart = unsafe { &mut *(uart_page.start().as_mut_ptr() as *mut UART0) };
        uart.init();
        *self.uart.write() = uart;
        SERVICE.set_sys_logger(&UART_LOGGER);
        // Initialize interrupts
        let irq = node.interrupts().unwrap().next().unwrap().0;
        SERVICE.interrupt_controller().set_irq_handler(irq, box || {
            let _guard = PL011.monitor.lock();
            while !self.uart().receive_fifo_empty() {
                let c = self.uart().dr.get() as u8;
                self.buffer.push(c);
            }
            PL011.monitor.notify_all();
            0
        });
        SERVICE.interrupt_controller().enable_irq(irq);
        kernel_module::module_call(
            "dev",
            &DevRequest::RegisterDev(&(self as &'static dyn Device)),
        );
        Ok(())
    }