Skip to main content

lumen_signal_array_get_field

Function lumen_signal_array_get_field 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn lumen_signal_array_get_field( name: *const c_char, row: usize, field: *const c_char, buf: *mut c_char, buf_len: usize, out_len: *mut usize, ) -> LumenStatus
Expand description

Read one field of one row of an array signal as a UTF-8 string (ABI 0.3).

Rows are the record-shaped (field -> stringified value) maps pushed through lumen_signal_set_array. Looks up row-th row’s field entry and copies it out following the same buffer convention as lumen_signal_get_str (NUL-terminated; ErrBufferTooSmall with *out_len = required capacity when buf is too small).

Returns LumenStatus::ErrBadArg when name / field is null or non-UTF-8, the array signal is absent, row is out of range, or the row has no such field.