fn char_slice_to_u8_slice<'a>(char_slice: & [char], u8_slice: &'a mut [u8]) -> &'a mut [u8] {
    let mut cur_u8_len:usize = 0;
    for char_indx in 0usize .. char_slice.len() {
        let target = char_slice[char_indx].encode_utf8(&mut u8_slice[cur_u8_len .. ]);
        cur_u8_len += target.len();
    }
    &mut u8_slice[0 .. cur_u8_len]
}
// Calls char.encode_utf8() to convert a char slice to append to an u8 slice.
// Returns the entire content of the target u8 slice.
// Data in char is alredy valid Unicode codepoint.
Calls char.encode_utf8() to convert a char slice to append to an u8 slice.
Returns the entire content of the target u8 slice.
Data in char is alredy valid Unicode codepoint.
Calls char . encode_utf8 () to convert a char slice to append to an u8 slice . Returns the entire content of the target u8 slice . Data in char is alredy valid Unicode codepoint .
fn char_slice_to_u8_slice<'a>(char_slice: & [char], u8_slice: &'a mut [u8]) -> &'a mut [u8] {
    let mut cur_u8_len:usize = 0;
    for char_indx in 0usize .. char_slice.len() {
        let target = char_slice[char_indx].encode_utf8(&mut u8_slice[cur_u8_len .. ]);
        cur_u8_len += target.len();
    }
    &mut u8_slice[0 .. cur_u8_len]
}
fn char_slice_to_u8_slice < ' a > ( char_slice : & [ char ] , u8_slice : & ' a mut [ u8 ] ) -> & ' a mut [ u8 ] { let mut cur_u8_len : usize = 0 ; for char_indx in 0usize .. char_slice . len ( ) { let target = char_slice [ char_indx ] . encode_utf8 ( & mut u8_slice [ cur_u8_len .. ] ) ; cur_u8_len += target . len ( ) ; } & mut u8_slice [ 0 .. cur_u8_len ] }
Calls char.encode_utf8() to convert a char slice to append to an u8 slice.
Calls char . encode_utf8 () to convert a char slice to append to an u8 slice .
char_slice
& [char]
u8_slice
&'a mut [u8]
char_slice
& [char]
u8_slice
&'a mut [u8]