fn byte3_action20(mybuf: & mut EightBytes, arg: u32) -> Utf8EndEnum {
    match mybuf.front() {
        Option::Some(v) => {
            let v3 = v as u32;
            // println!("in action 20 with v3={:#02x}", v3);
            if (v3 >= 0x80) && (v3 <= 0xbf) {
                mybuf.pop_front(); // advance
                let codepoint = (arg << 6) + (v3 & 0x3F);
                if codepoint == REPLACE_UTF32 {
                    // special processing logic for replacement character:
                    //
                    // Logic was that a replacement character represents a
                    // former invalid encoding or decoding of a codepoint.
                    // We treat them the same whether this was triggered
                    // fresh or from historical data source.
                    //
                    // BadDecode(3) means this event was detected after
                    // parsing 3 bytes. (EF, BF, BD)
                    Utf8EndEnum::BadDecode(3)
                }
                else {
                    Utf8EndEnum::Finish(codepoint)
                }
            }
            else {
                // println!("not within 0x80 and 0xbf");
                Utf8EndEnum::BadDecode(2)
            }
        }
        Option::None => {
            // println!("TypeUnknown");
            Utf8EndEnum::TypeUnknown
        }
    }
}
/// Finite state machine action 20 expect 80 to bf
/// Codepoint E000 to FFFF

Finite state machine action 20 expect 80 to bf
Codepoint E000 to FFFF
Finite state machine action 20 expect 80 to bf Codepoint E000 to FFFF
fn byte3_action20(mybuf: & mut EightBytes, arg: u32) -> Utf8EndEnum {
    match mybuf.front() {
        Option::Some(v) => {
            let v3 = v as u32;
            // println!("in action 20 with v3={:#02x}", v3);
            if (v3 >= 0x80) && (v3 <= 0xbf) {
                mybuf.pop_front(); // advance
                let codepoint = (arg << 6) + (v3 & 0x3F);
                if codepoint == REPLACE_UTF32 {
                    // special processing logic for replacement character:
                    //
                    // Logic was that a replacement character represents a
                    // former invalid encoding or decoding of a codepoint.
                    // We treat them the same whether this was triggered
                    // fresh or from historical data source.
                    //
                    // BadDecode(3) means this event was detected after
                    // parsing 3 bytes. (EF, BF, BD)
                    Utf8EndEnum::BadDecode(3)
                }
                else {
                    Utf8EndEnum::Finish(codepoint)
                }
            }
            else {
                // println!("not within 0x80 and 0xbf");
                Utf8EndEnum::BadDecode(2)
            }
        }
        Option::None => {
            // println!("TypeUnknown");
            Utf8EndEnum::TypeUnknown
        }
    }
}
fn byte3_action20 ( mybuf : & mut EightBytes , arg : u32 ) -> Utf8EndEnum { match mybuf . front ( ) { Option :: Some ( v ) => { let v3 = v as u32 ; // println!("in action 20 with v3={:#02x}", v3);
 if ( v3 >= 0x80 ) && ( v3 <= 0xbf ) { mybuf . pop_front ( ) ; // advance
 let codepoint = ( arg << 6 ) + ( v3 & 0x3F ) ; if codepoint == REPLACE_UTF32 { // special processing logic for replacement character:
 //
 // Logic was that a replacement character represents a
 // former invalid encoding or decoding of a codepoint.
 // We treat them the same whether this was triggered
 // fresh or from historical data source.
 //
 // BadDecode(3) means this event was detected after
 // parsing 3 bytes. (EF, BF, BD)
 Utf8EndEnum :: BadDecode ( 3 ) } else { Utf8EndEnum :: Finish ( codepoint ) } } else { // println!("not within 0x80 and 0xbf");
 Utf8EndEnum :: BadDecode ( 2 ) } } Option :: None => { // println!("TypeUnknown");
 Utf8EndEnum :: TypeUnknown } } }
Finite state machine action 20 expect 80 to bf
Codepoint E000 to FFFF
Finite state machine action 20 expect 80 to bf Codepoint E000 to FFFF
mybuf
& mut EightBytes
arg
u32
mybuf
& mut EightBytes
arg
u32