SDL_AsyncIOResult(3type)

πŸ’– SDL_AsyncIOResult πŸ’–

okay bestie, welcome to the SDL3 DATATYPES corner of the manual πŸŽ€ β€” this one's about SDL_AsyncIOResult, the lil enum that tells you how your async I/O task went. no cap, it's short, it's sweet, it's giving "three possible endings and that's it." ✨


🌸 NAME 🌸

SDL_AsyncIOResult β€” the possible outcomes of an asynchronous I/O task. that's it. that's the whole vibe. πŸ’…


✨ SYNOPSIS ✨

#include <SDL3/SDL_asyncio.h>

typedef enum SDL_AsyncIOResult
{
    SDL_ASYNCIO_COMPLETE,  /**< request was completed without error */
    SDL_ASYNCIO_FAILURE,   /**< request failed for some reason; check SDL_GetError()! */
    SDL_ASYNCIO_CANCELED   /**< request was canceled before completing. */
} SDL_AsyncIOResult;

so yeah, three members, each one a whole mood. let's break it down πŸ¦‹

  • SDL_ASYNCIO_COMPLETE β€” the request was completed without error. slay!! she ate, no notes, it's done and it worked. πŸ‘‘
  • SDL_ASYNCIO_FAILURE β€” the request failed for some reason. πŸ’€ bestie please go check SDL_GetError() immediately, the answer is in there, do not just sit there staring at this enum value. 😭
  • SDL_ASYNCIO_CANCELED β€” the request was canceled before completing. not a fail, not a win, just... canceled. it never got to finish its little story. πŸ₯²
fr fr, do NOT forget that SDL_ASYNCIO_FAILURE means you gotta call SDL_GetError() β€” that's your only clue and it's right there waiting for you. πŸ™ˆ

🌈 AVAILABILITY 🌈

this enum is available since SDL 3.2.0. so if you're on something older, she's simply not there yet, sorry babe. 🧚


and that's the whole page, you're basically an async I/O expert now, i don't make the rules. 🌟

this lil datatype page comes to you from Simple Directmedia Layer, SDL 3.4.18 edition β€” mwah, take care of her, and go check SDL_GetError() when things go wrong. πŸ«ΆπŸ’œ

πŸ“¦ where this page comes from