pub unsafe extern "C" fn aws_byte_buf_advance(
    buffer: *mut aws_byte_buf,
    output: *mut aws_byte_buf,
    len: usize
) -> bool
Expand description

Appends a sub-buffer to the specified buffer.

If the buffer has at least `len’ bytes remaining (buffer->capacity - buffer->len >= len), then buffer->len is incremented by len, and an aws_byte_buf is assigned to *output corresponding to the last len bytes of the input buffer. The aws_byte_buf at *output will have a null allocator, a zero initial length, and a capacity of ‘len’. The function then returns true.

If there is insufficient space, then this function nulls all fields in *output and returns false.