pub fn string_from_vec(vec: Vec<u8>) -> Result<String, Error>
Convert bytes to a UTF-8 string.
It returns an error if the bytes are not a valid UTF-8 string.