rpma_utils...event_2str(3)
β¨ rpma_utils_conn_event_2str β bestie edition β¨
okay so this is a page from the RPMA Programmer's Manual (that's the librpma manual, section 3, iykyk) and we're about to make enum-to-string conversion feel like a personality trait π
π NAME π
rpma_utils_conn_event_2str β the glow-up machine that turns an RPMA_CONN_* enum into a string π¦
πΈ SYNOPSIS πΈ
#include <librpma.h>
const char *rpma_utils_conn_event_2str(enum rpma_conn_event conn_event);
enum rpma_conn_event {
RPMA_CONN_UNDEFINED = -1,
RPMA_CONN_ESTABLISHED,
RPMA_CONN_CLOSED,
RPMA_CONN_LOST,
RPMA_CONN_REJECTED,
RPMA_CONN_UNREACHABLE
};
not me dropping the entire enum right there in the synopsis, but yes, that's the whole cast of characters π and yes RPMA_CONN_UNDEFINED is literally -1, she's the understudy, we love her anyway π
π DESCRIPTION π
so rpma_utils_conn_event_2str() takes one of those RPMA_CONN_* enum values and converts it into its const string representation. that's it. that's the whole job. and she ate, fr fr β¨
like β you hand her an enum, she hands you back a string, no drama, no side quests, just vibes π
β RETURN VALUE β
rpma_utils_conn_event_2str() returns the const string representation of the RPMA_CONN_* enums. one in, one string out. main character energy only π«Ά
π ERRORS π
rpma_utils_conn_event_2str() can not fail.
no cap. zero. none. she does not miss. the error handling section is giving empty group chat πβ¨
π SEE ALSO π
and that's the whole page bestie π§ go forth and convert your enums, you're doing amazing sweetie π
signing off β this was RPMA, dated 01 April 2024, from the rpma_utils...event_2str(3) girlies, mwah π
π¦ where this page comes from
- ubuntu noble: librpma-dev 1.3.0-2build2 Β· BSD-3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms