Function binary_utils::consume_utf16be_char

source ·
pub async fn consume_utf16be_char(
    reader: &mut (impl AsyncRead + Unpin),
    line: u32,
    file: &'static str
) -> Result<()>
Expand description

Consumes a single utf16be character asyncronously from the provided reader

This is intended to be used to move the cursor over an utf16be string.

§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 Ok(()) or an error if the reading failed

§Errors

This function can fail, if there is no data in the provided reader to read.