Skip to main content

hurray_buffer_handoff_consumer_stream

Function hurray_buffer_handoff_consumer_stream 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn hurray_buffer_handoff_consumer_stream( buffer: *const HurrayBuffer, payload: *const HurraySyncConsumerStreamPayload, ) -> HurrayStatus
Expand description

Validates a ConsumerStream-mode sync handoff from producer to consumer.

Checks that:

  • The buffer’s declared sync mode is SyncMode::ConsumerStream.
  • payload.consumer_stream is non-null.
  • payload.consumer_stream_device_tag matches the buffer’s declared device tag.

Returns HURRAY_OK if all checks pass; HURRAY_ERR_SYNC_MODE_MISMATCH otherwise.

§Safety

buffer and payload MUST be valid, non-null pointers pointing to live objects.