pub enum AtxError {
NotAtx {
found: Vec<u8>,
},
NoHead,
NoPayload,
UnsupportedPixelFormat {
pixel_format: (u32, u32),
},
InvalidDimensions {
width: u32,
height: u32,
},
PayloadTooSmall {
got: usize,
expected: usize,
},
Decompress(String),
AstcDecode(String),
}Expand description
Errors from reading or decoding an ATX container.
Bad magic is a bootstrap failure (the buffer is not an ATX container at all)
and fails loud. Per-artifact misses after a validated magic — a missing HEAD,
a truncated chunk — degrade to Atx::warnings rather than an error, so the
chunk inventory and any metadata still reach the caller.
Variants§
NotAtx
The buffer does not begin with the 8-byte AAPL magic.
NoHead
No HEAD chunk was present, so no metadata could be parsed.
NoPayload
No astc/ASTC/LZFS texture payload chunk was present.
UnsupportedPixelFormat
The pixel-format discriminator is not a recognized ASTC 4x4 mapping. The raw pair is surfaced so the analyst can identify it.
InvalidDimensions
HEAD declared dimensions that cannot form an image.
PayloadTooSmall
The texture payload was smaller than the declared geometry requires.
Decompress(String)
LZFSE decompression of an LZFS payload failed.
AstcDecode(String)
The ASTC decoder failed to consume the (de-tiled) block stream.
Trait Implementations§
Source§impl Error for AtxError
impl Error for AtxError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()