gix_pack/data/file/decode/
mod.rs1use std::collections::TryReserveError;
2
3pub mod entry;
5pub mod header;
7
8#[derive(thiserror::Error, Debug)]
12#[allow(missing_docs)]
13pub enum Error {
14 #[error("Failed to decompress pack entry")]
15 ZlibInflate(#[from] gix_features::zlib::inflate::Error),
16 #[error("A delta chain could not be followed as the ref base with id {0} could not be found")]
17 DeltaBaseUnresolved(gix_hash::ObjectId),
18 #[error(transparent)]
19 EntryType(#[from] crate::data::entry::decode::Error),
20 #[error("Entry too large to fit in memory")]
21 OutOfMemory,
22}
23
24impl From<TryReserveError> for Error {
25 #[cold]
26 fn from(_: TryReserveError) -> Self {
27 Self::OutOfMemory
28 }
29}