63 std::unique_ptr<Impl> impl_;
75 std::vector<std::uint8_t>
bytes;
85 const std::filesystem::path& destination,
friend runtime::Result< CapsuleArchive, CapsuleError > open_archive(const std::filesystem::path &, const CapsuleLimits &)
std::span< const MemberInfo > members() const noexcept
Members in archive order. The manifest is always index 0.
std::span< const std::uint8_t > manifest_bytes() const noexcept
The bounded root manifest bytes.
std::uint64_t peak_bytes() const noexcept
Peak bytes charged so far.
CapsuleArchive(CapsuleArchive &&) noexcept
runtime::Result< std::vector< std::uint8_t >, CapsuleError > read(std::string_view path) const
Expand one member.
Result<T, E> — either holds a T or an E, never both.
Definition result.hpp:76
Archive and path budgets.
Definition archive.hpp:24
constexpr CapsuleLimits kCapsuleLimitsV1
The frozen v1 budgets.
Definition limits.hpp:35
runtime::Result< std::uint64_t, CapsuleError > write_archive_no_replace(const std::vector< WriteMember > &members, const std::filesystem::path &destination, const CapsuleLimits &limits=kCapsuleLimitsV1)
Write deterministically to a path that must not already exist.
runtime::Result< CapsuleArchive, CapsuleError > open_archive(const std::filesystem::path &path, const CapsuleLimits &limits=kCapsuleLimitsV1)
Definition generated_event_source.hpp:33
Result<T, E> — success / failure union for fallible operations.
Admission failure vocabulary for authoring capsules.
A rejection with the exact subject that caused it.
Definition status.hpp:69
Definition archive.hpp:26
std::string path
Definition archive.hpp:27
std::uint64_t compressed_bytes
Definition archive.hpp:28
std::uint64_t expanded_bytes
Definition archive.hpp:29
std::uint16_t method
Store (0) or deflate (8). Any other method is unsafe_archive.
Definition archive.hpp:31
One member to write. path must already be normalized.
Definition archive.hpp:73
std::string path
Definition archive.hpp:74
std::vector< std::uint8_t > bytes
Definition archive.hpp:75