copc_temporal/error.rs
1use thiserror::Error;
2
3/// Errors that can occur when reading the temporal index.
4#[derive(Debug, Error)]
5pub enum TemporalError {
6 /// The temporal EVLR header is shorter than 32 bytes.
7 #[error("temporal index EVLR header is truncated")]
8 TruncatedHeader,
9
10 /// The temporal index version is not supported by this reader.
11 #[error("unsupported temporal index version: {0}")]
12 UnsupportedVersion(u32),
13
14 /// The stride value in the header is invalid.
15 #[error("invalid stride: {0} (must be >= 1)")]
16 InvalidStride(u32),
17
18 /// I/O error from the underlying byte source.
19 #[error("I/O error reading temporal index: {0}")]
20 Io(#[from] std::io::Error),
21
22 /// Error propagated from the COPC streaming reader.
23 #[error("COPC streaming error: {0}")]
24 Copc(#[from] copc_streaming::CopcError),
25}