Skip to main content

Module pack_archive

Module pack_archive 

Source
Expand description

Versioned Pack Archive encoding, decoding, read, and write.

Re-exports§

pub use crate::CommitCertainty;

Structs§

FileWriteError
Evidence and the concrete cause from failed atomic filesystem write.
FileWriteReceipt
Evidence from successful atomic filesystem write.
StreamWriteError
Evidence and the concrete cause from failed exact stream write.
StreamWriteReceipt
Evidence from successful exact stream write.

Enums§

ArchiveError
A malformed, unsafe, ambiguous, or unsupported raw Pack Archive.
DecodeError
A failure in one phase of Pack Archive Decoding.
EncodeError
A failure in one phase of Pack Archive Encoding.
FileReadError
A failure while reading exact Pack Archive bytes from a file.
FileReadPhase
The filesystem phase in which Pack Archive Read failed.
FileWriteErrorCause
The concrete cause of a filesystem write failure.
FileWritePhase
The filesystem write phase reached by an attempt.
FileWritePolicy
The strict atomic policy requested for filesystem write.
ManifestError
A manifest that could not be accepted.
OpenPackError
A failure in bounded file read followed by Pack Archive Decoding.
ReadError
A failure while reading exact Pack Archive bytes from a stream.
ReadPackError
A failure in bounded read followed by Pack Archive Decoding.
RepresentationError
A valid Pack value that version 1 cannot represent.
ReservedMemberRole
A reserved version-1 archive role that font data cannot occupy.
SavePackError
A failure in Pack Archive Encoding followed by atomic file write.
StagingResidueStatus
The observed state of same-directory staging when an attempt returns.
StreamWritePhase
The stream write phase reached by an attempt.
WritePackError
A failure in Pack Archive Encoding followed by stream write.

Constants§

FORMAT_VERSION
The pack format version this crate reads and writes.
MANIFEST_PATH
The archive entry name of the manifest.

Functions§

decode
Decodes one borrowed exact Pack Archive into an authoritative Pack.
encode
Encodes one borrowed validated Pack into uniquely owned exact archive bytes.
encode_with_limits
Encodes one borrowed validated Pack under explicit resource ceilings.
open_pack
Reads and decodes one Pack file while preserving exact bytes on decode failure.
read
Reads exact bytes from a stream under a mandatory finite ceiling.
read_file
Reads exact bytes from one file using known-size preflight and metered reads.
read_pack
Reads and decodes one Pack while preserving exact bytes on decode failure.
save_pack
Encodes and atomically writes one Pack while preserving bytes on failure.
save_pack_with_limits
Encodes under explicit resource ceilings and atomically writes one Pack.
write
Writes exact Pack Archive bytes to a stream and flushes the writer.
write_file
Atomically writes exact Pack Archive bytes from same-directory staging.
write_pack
Encodes and writes one Pack while preserving exact bytes on write failure.
write_pack_with_limits
Encodes under explicit resource ceilings and writes one Pack.

Type Aliases§

DecodeLimitError
A Pack Archive exceeded a mandatory decode ceiling.
DecodeLimits
Mandatory finite resource ceilings for Pack Archive Decoding.
DecodeResource
A resource bounded during Pack Archive Decoding.
EncodeLimitError
A Pack Archive exceeded a mandatory encode ceiling.
EncodeLimits
Mandatory finite resource ceilings for Pack Archive Encoding.
EncodeResource
A resource bounded during Pack Archive Encoding.
ReadLimitError
Pack Archive Read exceeded a mandatory ceiling.
ReadLimits
Mandatory finite resource ceilings for Pack Archive Read.
ReadResource
A resource bounded during Pack Archive Read.