chronix_engine/index/
error.rs1use thiserror::Error;
4
5#[derive(Debug, Error)]
7pub enum IndexError {
8 #[error("Index I/O error: {0}")]
10 Io(#[from] std::io::Error),
11
12 #[error("Segment not found in catalog: {0}")]
14 SegmentNotFound(u64),
15
16 #[error("Corrupt index: {detail}")]
18 Corrupt {
19 detail: String,
21 },
22
23 #[error("Binary serialization error: {0}")]
25 BinarySerialization(String),
26
27 #[error("Manifest error: {detail}")]
29 Manifest {
30 detail: String,
32 },
33}
34
35pub type Result<T> = std::result::Result<T, IndexError>;