rpma_utils...event_2str(3)

πŸ“¦
version 1.3.0 Β· 3 versions
, in ubuntu noble

✨ 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