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: _1839_longest_substring_of_all_vowels_in_order.rs
    path of file: ./repos/rustgym/leetcode/src/d18
    
    the code of the file until where you have to start completion: struct Solution;

impl Solution {
    fn longest_beautiful_substring(word: String) -> i32 {
        let word: Vec<char> = word.chars().collect();
        let vowels: Vec<char> = vec!['a', 'e', 'i', 'o', 'u'];
        let mut start = 0;
        let n = word.len();
        let mut res = 0;
        'outer: while start < n {
            while 
    
    fn longest_beautiful_substring(word: String) -> i32 {
        let word: Vec<char> = word.chars().collect();
        let vowels: Vec<char> = vec!['a', 'e', 'i', 'o', 'u'];
        let mut start = 0;
        let n = word.len();
        let mut res = 0;
        'outer: while start < n {
            while start < n && word[start] != 'a' {
                start += 1;
            }
            let mut end = start;
            for i in 0..5 {
                if !(end < n && word[end] == vowels[i]) {
                    start = end;
                    continue 'outer;
                }
                while end < n && word[end] == vowels[i] {
                    end += 1;
                }
            }
            res = res.max(end - start);
            start = end;
        }
        res as i32
    }