LibJuno 1.0.1
LibJuno is a lightweight C11 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
JUNO_DS_ARRAY_API_TAG Struct Reference

Array API vtable. More...

#include <array_api.h>

Data Fields

JUNO_STATUS_T(* SetAt )(JUNO_DS_ARRAY_ROOT_T *ptArray, JUNO_POINTER_T tItem, size_t iIndex)
 Set the value at an index.
 
JUNO_RESULT_POINTER_T(* GetAt )(JUNO_DS_ARRAY_ROOT_T *ptArray, size_t iIndex)
 Get the value at an index.
 
JUNO_STATUS_T(* RemoveAt )(JUNO_DS_ARRAY_ROOT_T *ptArray, size_t iIndex)
 Remove a value at an index.
 

Detailed Description

Array API vtable.

Field Documentation

◆ GetAt

JUNO_RESULT_POINTER_T(* JUNO_DS_ARRAY_API_TAG::GetAt) (JUNO_DS_ARRAY_ROOT_T *ptArray, size_t iIndex)

Get the value at an index.

Parameters
ptArrayArray instance.
iIndexIndex into the backing storage.
Returns
Result containing a pointer descriptor to the slot on success; JUNO_STATUS_OOB_ERROR on invalid index; or implementation-specific errors.

◆ RemoveAt

JUNO_STATUS_T(* JUNO_DS_ARRAY_API_TAG::RemoveAt) (JUNO_DS_ARRAY_ROOT_T *ptArray, size_t iIndex)

Remove a value at an index.

Parameters
ptArrayArray instance.
iIndexIndex into the backing storage.
Returns
JUNO_STATUS_SUCCESS on success; JUNO_STATUS_OOB_ERROR on invalid index; or implementation-specific errors (e.g., Reset failures).

◆ SetAt

JUNO_STATUS_T(* JUNO_DS_ARRAY_API_TAG::SetAt) (JUNO_DS_ARRAY_ROOT_T *ptArray, JUNO_POINTER_T tItem, size_t iIndex)

Set the value at an index.

Parameters
ptArrayArray instance.
tItemPointer descriptor describing the value to copy into slot iIndex.
iIndexIndex into the backing storage (0 <= iIndex < zCapacity).
Returns
JUNO_STATUS_SUCCESS on success; JUNO_STATUS_OOB_ERROR on invalid index; or implementation-specific pointer errors (e.g., INVALID_SIZE).

The documentation for this struct was generated from the following file: