Skip to main content

spatialrust_lod/
error.rs

1/// LOD operation result.
2pub type LodResult<T> = Result<T, LodError>;
3
4/// LOD validation, admission, or adapter error.
5#[derive(Clone, Debug, PartialEq, Eq, thiserror::Error)]
6pub enum LodError {
7    /// Index metadata is malformed.
8    #[error("invalid LOD index: {0}")]
9    InvalidIndex(String),
10    /// Planner configuration or camera is invalid.
11    #[error("invalid LOD planner state: {0}")]
12    InvalidPlanner(String),
13    /// A hard resource budget rejected work before allocation/upload.
14    #[error("LOD budget exceeded: {0}")]
15    BudgetExceeded(String),
16    /// A node was missing.
17    #[error("unknown LOD node {0}")]
18    UnknownNode(u64),
19    /// Record-memory lease admission failed.
20    #[cfg(feature = "records")]
21    #[error("record lease failed: {0}")]
22    Records(String),
23    /// COPC query adaptation failed.
24    #[cfg(feature = "copc")]
25    #[error("COPC LOD adapter failed: {0}")]
26    Copc(String),
27}