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 record
Represents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
static final StructLayout
static final AddressLayout
static final AddressLayout
static final ValueLayout.OfLong
static final ValueLayout.OfLong
static final ValueLayout.OfLong
static final ValueLayout.OfInt
static final ValueLayout.OfInt
static final AddressLayout
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
-
Constructor Summary
ConstructorsConstructorDescriptionSDL_AsyncIOOutcome
(@NotNull MemorySegment segment) Creates an instance of aSDL_AsyncIOOutcome
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_AsyncIOOutcome
static SDL_AsyncIOOutcome.Ptr
@Nullable SDL_AsyncIO
asyncio()
asyncio
(@Nullable SDL_AsyncIO value) buffer()
void
buffer
(MemorySegment value) long
bytes_requested
(long value) long
bytes_transferred
(long value) static SDL_AsyncIOOutcome
clone
(Arena arena, SDL_AsyncIOOutcome src) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.long
offset()
offset
(long value) int
result()
result
(int value) @NotNull MemorySegment
segment()
Returns the value of thesegment
record component.final String
toString()
Returns a string representation of this record class.int
type()
type
(int value) userdata()
void
userdata
(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_AsyncIOOutcome
record class.- Parameters:
segment
- the value for thesegment
record 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 thesegment
record component.
-