std :: string :: String
& [u8]
String
它与std::str::from_utf8一起工作:
std::str::from_utf8
std::str::from_utf8(byte_array).unwrap().to_string();
Playground
String::from_utf8(byte_array.to_vec()).unwrap()