aboutsummaryrefslogtreecommitdiff
path: root/crates/texm/src/error.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-06-22 12:12:27 +0300
committerValentin Popov <valentin@popov.link>2026-06-22 12:13:32 +0300
commitd0bdbaa1ed76dfbf3211bb43eee48c49cc4fd448 (patch)
treea0bd35c3940be62a5b5de1acc2366af377ffd181 /crates/texm/src/error.rs
parent7416fdc7e9a48837fff5056e6dc8d0774e90964b (diff)
downloadfparkan-d0bdbaa1ed76dfbf3211bb43eee48c49cc4fd448.tar.xz
fparkan-d0bdbaa1ed76dfbf3211bb43eee48c49cc4fd448.zip
feat: implement FParkan architecture foundation
Add the modular fparkan workspace, domain crates, adapters, apps, xtask policy/CI, acceptance evidence, and licensed corpus gates for the macOS-focused roadmap foundation.
Diffstat (limited to 'crates/texm/src/error.rs')
-rw-r--r--crates/texm/src/error.rs86
1 files changed, 0 insertions, 86 deletions
diff --git a/crates/texm/src/error.rs b/crates/texm/src/error.rs
deleted file mode 100644
index 90d618d..0000000
--- a/crates/texm/src/error.rs
+++ /dev/null
@@ -1,86 +0,0 @@
-use core::fmt;
-
-#[derive(Debug)]
-#[non_exhaustive]
-pub enum Error {
- HeaderTooSmall {
- size: usize,
- },
- InvalidMagic {
- got: u32,
- },
- InvalidDimensions {
- width: u32,
- height: u32,
- },
- InvalidMipCount {
- mip_count: u32,
- },
- UnknownFormat {
- format: u32,
- },
- IntegerOverflow,
- CoreDataOutOfBounds {
- expected_end: usize,
- actual_size: usize,
- },
- MipIndexOutOfRange {
- requested: usize,
- mip_count: usize,
- },
- MipDataOutOfBounds {
- offset: usize,
- size: usize,
- payload_size: usize,
- },
- InvalidPageMagic,
- InvalidPageSize {
- expected: usize,
- actual: usize,
- },
-}
-
-impl fmt::Display for Error {
- fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
- match self {
- Self::HeaderTooSmall { size } => {
- write!(f, "Texm payload too small for header: {size}")
- }
- Self::InvalidMagic { got } => write!(f, "invalid Texm magic: 0x{got:08X}"),
- Self::InvalidDimensions { width, height } => {
- write!(f, "invalid Texm dimensions: {width}x{height}")
- }
- Self::InvalidMipCount { mip_count } => write!(f, "invalid Texm mip_count={mip_count}"),
- Self::UnknownFormat { format } => write!(f, "unknown Texm format={format}"),
- Self::IntegerOverflow => write!(f, "integer overflow"),
- Self::CoreDataOutOfBounds {
- expected_end,
- actual_size,
- } => write!(
- f,
- "Texm core data out of bounds: expected_end={expected_end}, actual_size={actual_size}"
- ),
- Self::MipIndexOutOfRange {
- requested,
- mip_count,
- } => write!(
- f,
- "Texm mip index out of range: requested={requested}, mip_count={mip_count}"
- ),
- Self::MipDataOutOfBounds {
- offset,
- size,
- payload_size,
- } => write!(
- f,
- "Texm mip data out of bounds: offset={offset}, size={size}, payload_size={payload_size}"
- ),
- Self::InvalidPageMagic => write!(f, "Texm tail exists but Page magic is missing"),
- Self::InvalidPageSize { expected, actual } => {
- write!(f, "invalid Page chunk size: expected={expected}, actual={actual}")
- }
- }
- }
-}
-
-impl std::error::Error for Error {}