Function grpcio_sys::grpc_byte_buffer_reader_peek[][src]

pub unsafe extern "C" fn grpc_byte_buffer_reader_peek(
    reader: *mut grpc_byte_buffer_reader,
    slice: *mut *mut grpc_slice
) -> c_int

EXPERIMENTAL API - This function may be removed and changed, in the future.

Updates \a slice with the next piece of data from from \a reader and returns

  1. Returns 0 at the end of the stream. Caller is responsible for making sure the slice pointer remains valid when accessed.

NOTE: Do not use this function unless the caller can guarantee that the underlying grpc_byte_buffer outlasts the use of the slice. This is only safe when the underlying grpc_byte_buffer remains immutable while slice is being accessed.