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: 0150-evaluate-reverse-polish-notation.rs
    path of file: ./repos/NeetCode-Solutions/04_Stack/03_Evaluate_Reverse_Polish_Notation
    
    the code of the file until where you have to start completion: /*
Problem: LeetCode 150 - Evaluate Reverse Polish Notation

Key Idea:
The key idea is to use a stack to evaluate the given reverse Polish notation expression.

Approach:
1. Initialize an empty stack to store operands.
2. Iterate through each element in the input tokens:
   - If the current element is an operand (a number), push it onto the stack.
   - If the current element is an operator ('+', '-', '*', '/'):
     - Pop the top two elements from the stack as the operands.
     - Perform the operation based on the current operator and push the result back onto the stack.
3. After processing all elements, the result should be the only element left on the stack. Pop an
    
    pub fn eval_rpn(tokens: Vec<String>) -> i32 {
        let mut stack: Vec<i32> = Vec::new();

        for token in tokens {
            if let Ok(operand) = token.parse::<i32>() {
                stack.push(operand);
            } else {
                let b = stack.pop().unwrap();
                let a = stack.pop().unwrap();
                let result = match token.as_str() {
                    "+" => a + b,
                    "-" => a - b,
                    "*" => a * b,
                    "/" => a / b,
                    _ => 0, // Invalid operator, can be handled differently if needed
                };
                stack.push(result);
            }
        }

        stack.pop().unwrap()
    }