#[non_exhaustive]pub enum Error {
Show 19 variants
IncompatibleBoundary(String, String),
IndexConversion {
source_type: String,
target_type: String,
value: String,
},
IndexOverflow {
index_type: String,
value: String,
},
VerticesContainerFull {
attempted: usize,
maximum: usize,
},
ResourcePoolFull {
attempted: usize,
maximum: usize,
},
InvalidGeometry(String),
InvalidShell {
reason: String,
surface_count: usize,
},
InvalidRing {
reason: String,
vertex_count: usize,
},
InvalidLineString {
reason: String,
vertex_count: usize,
},
InvalidReference {
element_type: String,
index: usize,
max_index: usize,
},
InvalidThemeName {
theme_type: String,
theme: String,
},
InvalidGeometryType {
expected: String,
found: String,
},
IncompleteGeometry(String),
UnsupportedVersion(String, String),
InvalidCityObjectType(String),
InvalidJson(String),
MissingVersion,
UnsupportedCityJSONVersion(String),
Import(String),
}Expand description
Errors returned by cityjson-rs operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
IncompatibleBoundary(String, String)
Boundary type mismatch — e.g. trying to convert a Solid boundary into a MultiPoint.
IndexConversion
A vertex index could not be converted between integer types (e.g. u64 → u16 overflow).
IndexOverflow
A vertex index value exceeds the range of the target index type.
VerticesContainerFull
The vertex container is full for the chosen VR type (e.g. more than u32::MAX vertices).
ResourcePoolFull
A resource pool (semantics, materials, textures, or geometries) has reached its limit.
InvalidGeometry(String)
General geometry validation failure.
InvalidShell
A shell failed validation (e.g. fewer than four surfaces for a closed solid).
InvalidRing
A ring failed validation (e.g. fewer than three vertices).
InvalidLineString
A linestring failed validation (e.g. fewer than two vertices).
InvalidReference
A boundary index references an element that does not exist.
InvalidThemeName
A configured default appearance theme name does not exist in the model.
InvalidGeometryType
A geometry operation expected one type but found another.
IncompleteGeometry(String)
A geometry is structurally incomplete (e.g. missing required fields).
UnsupportedVersion(String, String)
The CityJSON "version" field holds an unsupported value.
InvalidCityObjectType(String)
The city object type string is not a known CityJSON type and does not start with "+".
InvalidJson(String)
JSON parsing failed.
MissingVersion
The CityJSON document is missing the required "version" field.
UnsupportedCityJSONVersion(String)
The CityJSON version is not supported by this crate.
Import(String)
An I/O or import error.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()