Function binary_utils::read_utf8_char
source · pub async fn read_utf8_char(
reader: &mut (impl AsyncRead + Unpin),
line: u32,
file: &'static str
) -> Result<char>Expand description
Reads a single UTF-8 character asyncronously from the provided reader
§Arguments
reader - A mutable reference to a type implemnting AsyncRead and Unpin
line - A line number, where the function is called
file - A static string slice containing the name of the file, where the function was called
§Returns
Returns an binary_utils::Result containing the UTF-8 char or an error if the reading failed
§Errors
This function can fail, if there is no data in the provided reader to read.