capnp-ts
Version:
Strongly typed Cap'n Proto implementation for the browser and Node.js using TypeScript
18 lines (17 loc) • 732 B
TypeScript
/**
* @author jdiaz5513
*/
import { ArenaAllocationResult } from "./arena-allocation-result";
import { ArenaKind } from "./arena-kind";
export declare class MultiSegmentArena {
static readonly allocate: typeof allocate;
static readonly getBuffer: typeof getBuffer;
static readonly getNumSegments: typeof getNumSegments;
readonly buffers: ArrayBuffer[];
readonly kind = ArenaKind.MULTI_SEGMENT;
constructor(buffers?: ArrayBuffer[]);
toString(): string;
}
export declare function allocate(minSize: number, m: MultiSegmentArena): ArenaAllocationResult;
export declare function getBuffer(id: number, m: MultiSegmentArena): ArrayBuffer;
export declare function getNumSegments(m: MultiSegmentArena): number;