Record Class SDL_AsyncIOOutcome
java.lang.Object
java.lang.Record
club.doki7.sdl3.datatype.SDL_AsyncIOOutcome
- All Implemented Interfaces:
IPointer,ISDL_AsyncIOOutcome
@ValueBasedCandidate
@UnsafeConstructor
public record SDL_AsyncIOOutcome(@NotNull MemorySegment segment)
extends Record
implements ISDL_AsyncIOOutcome
Information about a completed asynchronous I/O request.
Since: This struct is available since SDL 3.2.0.
Structure
typedef struct SDL_AsyncIOOutcome {
SDL_AsyncIO* asyncio;
SDL_AsyncIOTaskType type;
SDL_AsyncIOResult result;
void* buffer;
Uint64 offset;
Uint64 bytes_requested;
Uint64 bytes_transferred;
void* userdata;
} SDL_AsyncIOOutcome;
Contracts
The property segment() should always be not-null
(segment != NULL && !segment.equals(MemorySegment.NULL)), and properly aligned to
LAYOUT.byteAlignment() bytes. To represent null pointer, you may use a Java
null instead. See the documentation of IPointer.segment() for more details.
The constructor of this class is marked as UnsafeConstructor, because it does not
perform any runtime check. The constructor can be useful for automatic code generators.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final StructLayoutstatic final AddressLayoutstatic final AddressLayoutstatic final ValueLayout.OfLongstatic final ValueLayout.OfLongstatic final ValueLayout.OfLongstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final AddressLayoutstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionSDL_AsyncIOOutcome(@NotNull MemorySegment segment) Creates an instance of aSDL_AsyncIOOutcomerecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_AsyncIOOutcomestatic SDL_AsyncIOOutcome.Ptr@Nullable SDL_AsyncIOasyncio()asyncio(@Nullable SDL_AsyncIO value) buffer()voidbuffer(MemorySegment value) longbytes_requested(long value) longbytes_transferred(long value) static SDL_AsyncIOOutcomeclone(Arena arena, SDL_AsyncIOOutcome src) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longoffset()offset(long value) intresult()result(int value) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.final StringtoString()Returns a string representation of this record class.inttype()type(int value) userdata()voiduserdata(MemorySegment value)
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$asyncio
-
PATH$type
-
PATH$result
-
PATH$buffer
-
PATH$offset
-
PATH$bytes_requested
-
PATH$bytes_transferred
-
PATH$userdata
-
LAYOUT$asyncio
-
LAYOUT$type
-
LAYOUT$result
-
LAYOUT$buffer
-
LAYOUT$offset
-
LAYOUT$bytes_requested
-
LAYOUT$bytes_transferred
-
LAYOUT$userdata
-
SIZE$asyncio
public static final long SIZE$asyncio -
SIZE$type
public static final long SIZE$type -
SIZE$result
public static final long SIZE$result -
SIZE$buffer
public static final long SIZE$buffer -
SIZE$offset
public static final long SIZE$offset -
SIZE$bytes_requested
public static final long SIZE$bytes_requested -
SIZE$bytes_transferred
public static final long SIZE$bytes_transferred -
SIZE$userdata
public static final long SIZE$userdata -
OFFSET$asyncio
public static final long OFFSET$asyncio -
OFFSET$type
public static final long OFFSET$type -
OFFSET$result
public static final long OFFSET$result -
OFFSET$buffer
public static final long OFFSET$buffer -
OFFSET$offset
public static final long OFFSET$offset -
OFFSET$bytes_requested
public static final long OFFSET$bytes_requested -
OFFSET$bytes_transferred
public static final long OFFSET$bytes_transferred -
OFFSET$userdata
public static final long OFFSET$userdata
-
-
Constructor Details
-
SDL_AsyncIOOutcome
Creates an instance of aSDL_AsyncIOOutcomerecord class.- Parameters:
segment- the value for thesegmentrecord component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
asyncio
-
asyncio
-
type
-
type
-
result
-
result
-
buffer
-
buffer
-
buffer
-
offset
-
offset
-
bytes_requested
-
bytes_requested
-
bytes_transferred
-
bytes_transferred
-
userdata
-
userdata
-
userdata
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
segment
Returns the value of thesegmentrecord component.
-