rewrite this cpp code to rust code:
clicker.cpp:
#include "clicker.h"

// constructor
clicker::clicker(int min_cps, int max_cps, std::NAME_1 button, char toggle_on, char toggle_off, int keys[])
{
    this->toggle = false;
    this->holding = false;
    this->min_cps = min_cps;
    this->max_cps = max_cps;
    this->button = button;
    this->toggle_on = toggle_on;
    this->toggle_off = toggle_off;
    this->keys[0] = keys[0];
    this->keys[1] = keys[1];
    this->keys[2] = keys[1];
}

// set toggle
void clicker::set_toggle(bool toggle)
{ 
    // setter
    this->toggle = toggle; 
}

// set holding
void clicker::set_holding(bool holding)
{
    // setter
    this->holding = holding; 
}

// set cps
void clicker::set_cps()
{
    // get CPS
    std::cout << "Min CPS: ";
    std::NAME_1 min_cps_str;
    std::cin >> min_cps_str;

    std::cout << "Max CPS: ";
    std::NAME_1 max_cps_str;
    std::cin >> max_cps_str;

    try
    {
        // set cps
        this->min_cps = std::stoi(min_cps_str);
        this->max_cps = std::stoi(max_cps_str);
    }
    catch (...)
    {
        // print error message
        std::cout << "Invalid input!" << std::endl;
        this->set_cps();
    }
}

// set button
void clicker::set_button()
{
    // get button
    std::cout << "NAME_2 (L/R): ";
    std::NAME_1 button_str;
    std::cin >> button_str;

    try
    {
        // switch first character
        switch (std::tolower(button_str[0]))
        {
                // set based on case
            case 'l':
                this->button = "Left";
                this->keys[0] = VK_LBUTTON;
                this->keys[1] = MOUSEEVENTF_LEFTUP;
                this->keys[2] = MOUSEEVENTF_LEFTDOWN;
                break;
            case 'r':
                this->button = "Right";
                this->keys[0] = VK_RBUTTON;
                this->keys[1] = MOUSEEVENTF_RIGHTUP;
                this->keys[2] = MOUSEEVENTF_RIGHTDOWN;
                break;
            default:
                // print error message
                std::cout << "Invalid input!" << std::endl;
                this->set_button();
                break;
        }
    }
    catch (...)
    {
        // print error message
        std::cout << "Invalid input!" << std::endl;
        this->set_button();
    }
}

// set toggle on
void clicker::set_toggle_on()
{
    // get toggle on
    std::cout << "Toggle On (must be a letter/number): ";
    std::NAME_1 toggle_on_str;
    std::cin >> toggle_on_str;

    try
    {
        // set toggle on
        this->toggle_on Provide exactly two different responses that are separated with 6 asterisk symbols: ******.
user