pub enum CjseqError {
Json(Error),
GeometryDepth {
geometry_type: GeometryType,
expected: usize,
found: usize,
},
Io(Error),
Validation(String),
}Expand description
The crate’s error type.
Implemented by hand: this crate does not hand-write serde impls, and it does not take a derive dependency for its error type either.
Variants§
Json(Error)
A value was not the JSON the type expected, and nothing more specific could be said about why.
GeometryDepth
A geometry’s boundaries were nested to a depth its type does not
allow. serde reports this as “invalid type: integer, expected a
sequence”, which names neither the geometry nor the depth it wanted;
this variant names both.
Fields
geometry_type: GeometryTypeIo(Error)
An I/O operation failed, eg opening or reading a CityJSON(Seq) file.
Validation(String)
A document parsed as valid JSON, and every typed field on it parsed
fine, but it still fails a structural rule this crate enforces beyond
what serde alone can express – eg its type is not "CityJSON", or
its version is not one this crate supports.
Trait Implementations§
Source§impl Debug for CjseqError
impl Debug for CjseqError
Source§impl Display for CjseqError
impl Display for CjseqError
Source§impl Error for CjseqError
impl Error for CjseqError
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()