DoxigAlpha

initBuffer

Initialize with externally-managed memory. The buffer determines the capacity, and the length is set to zero.

When initialized this way, all functions that accept an Allocator argument cause illegal behavior.

Function parameters

Parameters

#

Deprecated.

Functions

#
Managed
Deprecated.
AlignedManaged
Deprecated.
Aligned
A contiguous, growable list of arbitrarily aligned items in memory.

Source

Implementation

#
pub fn initBuffer(buffer: Slice) Self {
    return .{
        .items = buffer[0..0],
        .capacity = buffer.len,
    };
}