pub unsafe extern "C" fn aws_byte_cursor_advance(
cursor: *mut aws_byte_cursor,
len: usize
) -> aws_byte_cursor
Expand description
Tests if the given aws_byte_cursor has at least len bytes remaining. If so, *buf is advanced by len bytes (incrementing ->ptr and decrementing ->len), and an aws_byte_cursor referring to the first len bytes of the original *buf is returned. Otherwise, an aws_byte_cursor with ->ptr = NULL, ->len = 0 is returned.
Note that if len is above (SIZE_MAX / 2), this function will also treat it as a buffer overflow, and return NULL without changing *buf.