Function rorm::rorm_stream_get_row

source ·
#[no_mangle]
pub extern "C" fn rorm_stream_get_row(
    stream_ptr: &'static mut BoxStream<'_, Result<Row, Error>>,
    callback: Option<unsafe extern "C" fn(_: usize, _: Option<Box<Row>>, _: Error<'_>)>,
    context: usize
)
Expand description

Use this function to retrieve a pointer to a row on a stream.

Parameter:

  • stream_ptr: Mutable pointer to the stream that is obtained from rorm_db_query_stream.
  • callback: callback function. Takes the context, a row pointer and a Error.
  • context: Pass through void pointer

Important:

  • Do not call this function multiple times on the same stream, unless all given callbacks have returned successfully. Calling the function multiple times on the same stream will result in undefined behaviour!
  • Do not call this function on the same stream if the previous call returned a Error::NoRowsLeftInStream.
  • Do not use pass the stream to another function unless the callback of the current call is finished

This function is called from an asynchronous context.