Product Type
DynamicBuffer
A buffer of elements stored in a contiguous region of memory, whose size is determined at instance creation.
type DynamicBuffer<Header: Deinitializable, Element>: Deinitializable,
Movable
Details
Warning: The deinitializer of DynamicBuffer does not deinitialize the elements that may be stored in its payload. You must ensure that they are properly deinitialized before deinit is called.
Members
Type Aliases
typealias BufferHeader = (capacity: Int, payload_header: Header)
The description of payloads in DynamicBuffers.
Bindings
Functions
static fun payload_offset() -> Int
Returns the number of bytes from a base pointer to the payload in instances of Self.
fun first_element_address() -> PointerToMutable<Element>
Returns the address of the initial element.
fun deinit() { sink }
Deinitializes self.
fun capacity() -> Int
The number of elements that can be stored in self.
fun buffer_header() -> PointerToMutable<BufferHeader>
Returns the address of the self's header.
Subscripts
property header: Header { let, inout }
Accesses the header of self.