tess 1.0.0
Performance-first tile and path simulation substrate
Loading...
Searching...
No Matches
tess::WorldArchiveSaveResult Struct Reference

#include <tess/persistence/archive.h>

Public Attributes

WorldArchiveInfo info {}
std::size_t bytes_written = 0

Detailed Description

Result of writing a world archive.

Deliberately carries no status. Saving has no runtime failure it can report: every precondition is a static_assert, and the one way the write can fail – the output vector running out of memory – is not representable as a returned value. In a build with exceptions that surfaces as std::bad_alloc from out; in an -fno-exceptions build it terminates, as the allocation contract in docs/architecture/no-exceptions.md describes.

This type exists because the shared WorldArchiveResult advertised the full 14-value WorldArchiveStatus enum on a call that only ever returned Ok. Symmetric error handling written against it was dead code, and – worse – it implied save had a failure channel, so callers did not guard the failure mode it actually has.


The documentation for this struct was generated from the following file: