block: Add error module skeleton

Introduce error.rs as the home for a unified error hierarchy that
will replace the per format error types at the public crate
boundary. This commit is intentionally empty beyond the copyright
header and module declaration in lib.rs.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
Anatol Belski
2026-03-04 22:26:12 +01:00
committed by Rob Bradford
parent 623af62743
commit f184a0f0f3
2 changed files with 18 additions and 0 deletions

17
block/src/error.rs Normal file
View File

@@ -0,0 +1,17 @@
// Copyright 2025 The Cloud Hypervisor Authors. All rights reserved.
//
// SPDX-License-Identifier: Apache-2.0
//! Unified error handling for the block crate.
//!
//! # Architecture
//!
//! ```text
//! BlockError -- single public error type
//! |-- BlockErrorKind -- small, stable, matchable classification
//! |-- ErrorContext -- optional diagnostic metadata (path, offset, op)
//! +-- source -- format-specific error (boxed)
//! |-- QcowError
//! |-- VhdError / RawError / ...
//! +-- io::Error / etc.
//! ```

View File

@@ -9,6 +9,7 @@
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause
pub mod async_io;
pub mod error;
pub mod fcntl;
pub mod fixed_vhd;
#[cfg(feature = "io_uring")]