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

Private dynamic buffer state used by the dynamic_buffer_stream backend. More...

#include <dynamic_buffer_stream_state.h>

Data Fields

char * buf
 
size_t cap
 
size_t len
 
size_t read_pos
 
bool autoclose
 

Detailed Description

This structure stores the managed in-memory buffer together with its capacity, current readable length, read cursor, and destruction policy.

Definition at line 31 of file dynamic_buffer_stream_state.h.

Field Documentation

◆ autoclose

bool dynamic_buffer_t::autoclose

Whether the buffer storage must be released when the backend closes.

Definition at line 45 of file dynamic_buffer_stream_state.h.

◆ buf

char* dynamic_buffer_t::buf

Buffer storage managed by the backend. May be NULL once released.

Definition at line 33 of file dynamic_buffer_stream_state.h.

◆ cap

size_t dynamic_buffer_t::cap

Total allocated buffer capacity, in bytes.

Definition at line 36 of file dynamic_buffer_stream_state.h.

◆ len

size_t dynamic_buffer_t::len

Number of bytes currently stored in the buffer.

Definition at line 39 of file dynamic_buffer_stream_state.h.

◆ read_pos

size_t dynamic_buffer_t::read_pos

Current read cursor inside the buffer.

Definition at line 42 of file dynamic_buffer_stream_state.h.