LexLeo 0.0.0-dev+f8e5087-dirty
Technical documentation
Loading...
Searching...
No Matches
stream_buffer_creator_t Struct Reference

Owner-facing creator object for buffer-backed streams. More...

#include <stream_buffer_creator.h>

Data Fields

stream_status_t(* create )(const void *ud, stream_t **out)
 Create a buffer-backed stream.
 
void * ud
 Opaque context bound to create.
 

Detailed Description

A stream_buffer_creator_t packages:

  • a creation callback,
  • opaque user data bound to that callback.

Such an object is typically prepared by the Composition Root and then injected into owner-side runtime code that needs to create buffer-backed stream_t instances without depending directly on factory wiring details.

Definition at line 36 of file stream_buffer_creator.h.

Field Documentation

◆ create

stream_status_t(* stream_buffer_creator_t::create) (const void *ud, stream_t **out)
Parameters
[in]udOpaque creator-owned context.
[out]outReceives the created stream handle.
Returns
A stream_status_t describing the creation result.

Definition at line 49 of file stream_buffer_creator.h.

◆ ud

void* stream_buffer_creator_t::ud

This pointer typically hides Composition Root wiring details such as a factory reference and the associated adapter key.

Definition at line 58 of file stream_buffer_creator.h.