Simple array "manager"
Become familiar with rustfmt. For example, else goes on the same line as the previous closing brace:

-        }
-        else if input == 2 {
+        } else if input == 2 {

Rust doesn't do tail call optimization, so unbounded recursive calls are better replaced with iteration.
I might extract a function that does the reading from standard input, trimming, and parsing.
No need for a type on the vec; inference will kick in.
You can use match with values like numbers. This can be used to replace the large if-else chain at the end of main.
Move the command out-of-range check/warning from the "parse" match to the match of the command value. This groups the error text closer to the place that will change.
I wouldn't embed the match inside the println!; it's not obvious enough. Instead, put the print inside the match.
Can then remove the continue because that's the normal flow
Don't convert the number to a string to print it; numbers implement Display.
You check the index twice; once when getting the value, once when actually indexing. Remove one or the other.




use std::io;

fn parsed_line&lt;T&gt;() -&gt; Result&lt;T, T::Err&gt;
    where T: std::str::FromStr
{
    let mut element = String::new();
    io::stdin().read_line(&amp;mut element).expect("Failed to read line!");
    element.trim().parse()
}

fn get_element() -&gt; i64 {
    loop {
        println!("Enter the element: ");

        match parsed_line() {
            Ok(num) =&gt; return num,
            Err(_) =&gt; println!("Invalid number! Try again."),
        }
    }
}

fn get_index(length: usize) -&gt; usize {
    loop {
        println!("Enter the index: ");

        match parsed_line() {
            Ok(index) if index &lt; length =&gt; return index,
            Ok(index) =&gt; {
                println!("Invalid index! {} is not in range [0, {})! Try again.", index, length);
            },
            Err(_) =&gt; {
                println!("Invalid number! Try again.");
            }
        }
    }
}

fn main() {
    println!("Welcome to the Vector application!");

    let mut vec = Vec::new();

    loop {
        println!("=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-");
        println!("What do you want to do?");
        println!("1. Clear the vector");
        println!("2. Add element");
        println!("3. Insert element at pos");
        println!("4. Delete an element at index");
        println!("5. Print an element");
        println!("6. Print vector");
        println!("*. Exit");

        let input: u8 = match parsed_line() {
            Ok(num) =&gt; num,
            Err(_) =&gt; break,
        };

        let length = vec.len();

        match input {
            1 =&gt; vec.clear(),
            2 =&gt; vec.push(get_element()),
            3 =&gt; vec.insert(get_index(length), get_element()),
            4 =&gt; {
                vec.remove(get_index(length));
            },
            5 =&gt; println!("The element is: {}", vec[get_index(length)]),
            6 =&gt; {
                for i in &amp;vec {
                    println!("{} ", i);
                }
            }
            other =&gt; println!("{} is not in the range [0, 6]!", other),
        };
    }
}