pub unsafe extern "C" fn ringbuffer_add_one(
    rb: *mut ringbuffer_t,
    c: c_char
) -> c_int
Expand description

@brief Add an element to the ringbuffer. @details If rb is full, then the oldest element gets overwritten. Test ringbuffer_full() first if overwriting is not intended. @param[in,out] rb Ringbuffer to operate on. @param[in] c Element to add. @returns The element that was dropped, iff the buffer was full. -1 iff the buffer was not full.