109 void *backend = stream->
backend;
#define LEXLEO_ASSERT(expr)
void stream_destroy(stream_t **s)
Destroy a stream handle.
stream_status_t stream_flush(stream_t *s)
Flush a stream.
size_t stream_write(stream_t *s, const void *buf, size_t n, stream_status_t *st)
Write bytes to a stream.
stream_status_t stream_create(stream_t **out, const stream_vtbl_t *vtbl, void *backend, const stream_env_t *env)
Create a generic stream handle from adapter-provided backend bindings.
const stream_ops_t * stream_default_ops(void)
Return the default borrower-facing ops table for the stream port.
stream_env_t stream_default_env(const osal_mem_ops_t *mem_ops)
Build a default stream_env_t from injected memory operations.
size_t stream_read(stream_t *s, void *buf, size_t n, stream_status_t *st)
Read bytes from a stream.
Borrower-facing runtime operations for the stream port.
Adapter-side API for constructing and binding stream_t objects.
stream_status_t(* stream_close_fn_t)(void *backend)
Backend close operation for a stream adapter.
Private stream handle definition for the stream port.
Lifecycle services for stream_t handles.
stream_status_t
Public status codes used by the stream port.
@ STREAM_STATUS_NO_BACKEND
void *(* calloc)(size_t nmemb, size_t size)
Runtime environment for the stream port.
const osal_mem_ops_t * mem
Memory operations used by the stream port.
Borrower-facing operation table for the stream port.
size_t(* read)(stream_t *s, void *buf, size_t n, stream_status_t *st)
Read bytes from a stream.
Private handle structure for a stream_t.
const osal_mem_ops_t * mem
Adapter dispatch table bound to a stream_t instance.