22 std::vector<std::uint8_t>
bytes;
77 std::span<const Concept>
representable() const noexcept {
return representable_; }
94 ConceptCensus census_;
95 std::vector<Concept> representable_;
113 std::function<runtime::Result<ExportArtifacts, ExportError>(
const ExportPlan&)>;
124 std::function<runtime::Result<ExportArtifacts, ExportError>(
const ExportPlan&)>;
128 : format_(
format), function_(
std::move(function)) {}
130 explicit operator bool() const noexcept {
return static_cast<bool>(function_); }
Which interchange concepts a document uses, how often, and where.
Definition census.hpp:28
A document measured against one format's capability table: what survives, and what it costs.
Definition export_plan.hpp:68
const LossManifest & losses() const noexcept
Definition export_plan.hpp:79
bool is_lossless() const noexcept
True when no model-detectable concept needs a lossy format row.
Definition export_plan.hpp:82
Format format() const noexcept
Definition export_plan.hpp:70
std::span< const Concept > representable() const noexcept
Concept kinds present in the document that the format supports in isolation.
Definition export_plan.hpp:77
const ConceptCensus & census() const noexcept
Definition export_plan.hpp:72
std::vector< Concept > required_consent() const
The concepts a caller must accept for run_export to proceed.
const timeline::Project & project() const noexcept
Definition export_plan.hpp:71
friend ExportPlan plan_export(const timeline::Project &, Format, const CensusLimits &)
Measure a document against a format.
Everything one export costs the document.
Definition loss.hpp:37
Result<T, E> — either holds a T or an E, never both.
Definition result.hpp:76
Immutable root of a Timeline document and its monotonic identity domain.
Definition model.hpp:1079
ExportErrorCode
Definition export_plan.hpp:29
@ NoWriterRegistered
No writer was supplied for the format.
Definition export_plan.hpp:33
@ UnacceptedLoss
The plan loses concepts the caller did not list in accepted_losses.
Definition export_plan.hpp:31
@ WriterFormatMismatch
The supplied writer belongs to a different interchange format.
Definition export_plan.hpp:37
@ WriterFailed
The writer ran and failed on its own terms.
Definition export_plan.hpp:35
runtime::Result< ExportArtifacts, ExportError > run_export(const ExportPlan &plan, const ExportOptions &options, const ExportWriter &writer)
Execute a plan.
ExportPlan plan_export(const timeline::Project &project, Format format, const CensusLimits &limits={})
Measure a document against a format.
Format
Interchange formats with a committed capability declaration.
Definition capability_tables.hpp:38
std::function< runtime::Result< ExportArtifacts, ExportError >(const ExportPlan &)> ExportWriter
The released v0.759 writer seam.
Definition export_plan.hpp:112
std::string loss_manifest_json(const ExportPlan &plan)
Serialize the canonical loss manifest carried by every plan and export result.
Result<T, E> — success / failure union for fallible operations.
Bounds on how much evidence one census retains.
Definition census.hpp:16
What one export produced.
Definition export_plan.hpp:20
std::vector< std::uint8_t > bytes
Definition export_plan.hpp:22
std::string name
Definition export_plan.hpp:21
Definition export_plan.hpp:25
std::vector< ExportArtifact > artifacts
Definition export_plan.hpp:26
Definition export_plan.hpp:40
std::vector< Concept > concepts
The concepts the error is about. Populated for UnacceptedLoss.
Definition export_plan.hpp:44
ExportErrorCode code
Definition export_plan.hpp:41
std::string message
Definition export_plan.hpp:42
Definition export_plan.hpp:47
std::vector< Concept > accepted_losses
Per-concept consent: every concept the plan reports as lost must appear here or the export refuses.
Definition export_plan.hpp:56