class NativeByteBorrow
source · line 7public
public class NativeByteBorrow internal constructor(
owner: NativeByteBuffer,
private val address: Ptr<Byte>?,
/**
* The maximum number of bytes covered by this borrow.
*/
public val length: Long,
private val writable: Boolean
)
An explicit native-buffer borrow retaining its owner until completion. It must be completed exactly once after all native access ends.
function complete
source · line 33public
@Unsafe
public fun complete(count: Long): Unit
Ends the borrow and advances the appropriate owner cursor by a valid consumed/produced count. Repeated completion is rejected.
parameter count
source · line 34public
count: Long
function pointer
source · line 23public
@Unsafe
public fun pointer(): Ptr<Byte>?
Returns the borrowed native address, or None for an empty region. Access after completion is invalid.
property length
source · line 13public
public val length: Long
get: public read-only
The maximum number of bytes covered by this borrow.