Skip to content

Commit 2781ffe

Browse files
committed
asyncio: transfer missing doc strings to enum and struct types
1 parent ef9d108 commit 2781ffe

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

asyncio.c.v

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,29 @@ pub struct C.SDL_AsyncIO {
8787
// NOTE: Opaque type
8888
}
8989

90+
// The asynchronous I/O operation structure.
91+
//
92+
// This operates as an opaque handle. One can then request read or write
93+
// operations on it.
94+
//
95+
// NOTE: This struct is available since SDL 3.2.0.
96+
//
97+
// See also: SDL_AsyncIOFromFile
9098
pub type AsyncIO = C.SDL_AsyncIO
9199

100+
// Types of asynchronous I/O tasks.
101+
//
102+
// NOTE: This enum is available since SDL 3.2.0.
92103
// AsyncIOTaskType is C.SDL_AsyncIOTaskType
93104
pub enum AsyncIOTaskType {
94105
read = C.SDL_ASYNCIO_TASK_READ // `read` A read operation.
95106
write = C.SDL_ASYNCIO_TASK_WRITE // `write` A write operation.
96107
close = C.SDL_ASYNCIO_TASK_CLOSE // `close` A close operation.
97108
}
98109

110+
// Possible outcomes of an asynchronous I/O task.
111+
//
112+
// NOTE: This enum is available since SDL 3.2.0.
99113
// AsyncIOResult is C.SDL_AsyncIOResult
100114
pub enum AsyncIOResult {
101115
complete = C.SDL_ASYNCIO_COMPLETE // `complete` request was completed without error
@@ -116,13 +130,29 @@ pub mut:
116130
userdata voidptr // pointer provided by the app when starting the task
117131
}
118132

133+
// Information about a completed asynchronous I/O request.
134+
//
135+
// NOTE: This struct is available since SDL 3.2.0.
119136
pub type AsyncIOOutcome = C.SDL_AsyncIOOutcome
120137

121138
@[noinit; typedef]
122139
pub struct C.SDL_AsyncIOQueue {
123140
// NOTE: Opaque type
124141
}
125142

143+
// A queue of completed asynchronous I/O tasks.
144+
//
145+
// When starting an asynchronous operation, you specify a queue for the new
146+
// task. A queue can be asked later if any tasks in it have completed,
147+
// allowing an app to manage multiple pending tasks in one place, in whatever
148+
// order they complete.
149+
//
150+
// NOTE: This struct is available since SDL 3.2.0.
151+
//
152+
// See also: SDL_CreateAsyncIOQueue
153+
// See also: SDL_ReadAsyncIO
154+
// See also: SDL_WriteAsyncIO
155+
// See also: SDL_GetAsyncIOResult
126156
pub type AsyncIOQueue = C.SDL_AsyncIOQueue
127157

128158
// C.SDL_AsyncIOFromFile [official documentation](https://wiki.libsdl.org/SDL3/SDL_AsyncIOFromFile)

0 commit comments

Comments
 (0)