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: mouse.rs
    path of file: ./repos/dustbox-rs/dustbox/src
    
    the code of the file until where you have to start completion: /// PS/2 Mouse implementation
/// Exposes a 2D mouse pointer with a left, right and middle buttons
///
/// https://wiki.osdev.org/Mouse_Input

use crate::cpu::{CPU, R};
use crate::machine::Component;
use crate::memory::MMU;

const DEBUG_MOUSE: bool = false;

#[derive(Debug)]
pub enum MouseButton {
    Left,
    Right,
    Middle,
}

pub struct Mouse {
    x: i32,
    y: i32
    
    fn int(&mut self, int: u8, cpu: &mut CPU, _mmu: &mut MMU) -> bool {
        if int != 0x33 {
            return false;
        }
        // NOTE: logitech mouse extender use AH too
        match cpu.get_r16(R::AX) {
            0x0000 => {
                // MS MOUSE - RESET DRIVER AND READ STATUS
                cpu.set_r16(R::AX, 0xFFFF); // hardware/driver installed
                cpu.set_r16(R::BX, 0x0003); // three-button mouse
            }
            0x0003 => {
                // MS MOUSE v1.0+ - RETURN POSITION AND BUTTON STATUS
                cpu.set_r16(R::BX, self.button_status());   // BX = button status
                cpu.set_r16(R::CX, self.x as u16);          // CX = column
                cpu.set_r16(R::DX, self.y as u16);          // DX = row
                if DEBUG_MOUSE {
                    println!("MOUSE - RETURN POSITION AND BUTTON STATUS");
                }
            }
            0x0007 => {
                // MS MOUSE v1.0+ - DEFINE HORIZONTAL CURSOR RANGE
                // CX = minimum column
                // DX = maximum column
                // Note: In text modes, the minimum and maximum columns are truncated to the next lower multiple of the cell size, typically 8x8 pixels 
                let cx = cpu.get_r16(R::CX);
                let dx = cpu.get_r16(R::DX);
                self.min_x = cx;
                self.max_x = dx;
                if DEBUG_MOUSE {
                    println!("MOUSE - DEFINE HORIZONTAL CURSOR RANGE min {}, max {}", cx, dx);
                }
            }
            0x0008 => {
                // MS MOUSE v1.0+ - DEFINE VERTICAL CURSOR RANGE
                // CX = minimum row
                // DX = maximum row
                // Note: In text modes, the minimum and maximum rows are truncated to the next lower multiple of the cell size, typically 8x8 pixels 
                let cx = cpu.get_r16(R::CX);
                let dx = cpu.get_r16(R::DX);
                self.min_y = cx;
                self.max_y = dx;
                if DEBUG_MOUSE {
                    println!("MOUSE - DEFINE VERTICAL CURSOR RANGE min {}, max {}", cx, dx);
                }
            }
            _ => return false
        }
        true
    }