// generated by diplomat-tool import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; /** * Every fallible method in the bridge returns `Result` — * see `stencil/docs/nucleation-error.md` for how these variants were derived from * the three error conventions the old hand-written `ffi` module mixed. */ export class NucleationError { /** @internal */ static fromValue(value: NucleationError | string): NucleationError; get value(): string; /** @internal */ get ffiValue(): number; static NullArgument : NucleationError; static InvalidArgument : NucleationError; static Parse : NucleationError; static Serialize : NucleationError; static Io : NucleationError; static Lock : NucleationError; static Store : NucleationError; static Mesh : NucleationError; static Render : NucleationError; static Simulation : NucleationError; static AlreadyConsumed : NucleationError; static NotFound : NucleationError; /** * A world-generation source failed while producing a chunk, even though * the request itself was well-formed (see `world_generation`). */ static Generation : NucleationError; /** * Why the last failing bridge call on this thread failed, in words. * * The enum cannot carry a message across the FFI, so a caught error * is a bare variant — `InvalidArgument` — while the layer that * refused already knew it was "19.2M cells over the 8M cap". Modules * that know the story record it; this reads it back, so an exception * handler holding the error value can ask it for the words. Empty * when the last detail-carrying call succeeded. */ detail(): string; constructor(value: NucleationError | string ); }