pub enum ShapefileError {
Show 23 variants
InvalidHeader {
message: String,
},
InvalidFileCode {
actual: i32,
},
InvalidVersion {
version: i32,
},
UnsupportedShapeType {
shape_type: i32,
},
InvalidShapeType {
shape_type: i32,
},
InvalidGeometry {
message: String,
record: Option<usize>,
},
InvalidCoordinates {
message: String,
position: Option<usize>,
},
InvalidBbox {
message: String,
},
DbfError {
message: String,
field: Option<String>,
record: Option<usize>,
},
InvalidDbfHeader {
message: String,
},
InvalidFieldDescriptor {
message: String,
field: Option<String>,
},
InvalidFieldValue {
message: String,
field: String,
record: usize,
},
EncodingError {
message: String,
code_page: Option<u8>,
},
ShxError {
message: String,
record: Option<usize>,
},
RecordMismatch {
shp_count: usize,
dbf_count: usize,
},
MissingFile {
file_type: String,
},
Io(Error),
UnexpectedEof {
message: String,
},
Validation {
message: String,
path: Option<String>,
},
Topology {
message: String,
},
OutOfMemory {
message: String,
},
LimitExceeded {
message: String,
limit: usize,
actual: usize,
},
OxiGdal(OxiGdalError),
}Expand description
Comprehensive error type for Shapefile operations
Variants§
InvalidHeader
Invalid Shapefile header
InvalidFileCode
Invalid file code
InvalidVersion
Invalid version
UnsupportedShapeType
Unsupported shape type
InvalidShapeType
Invalid shape type
InvalidGeometry
Invalid geometry
InvalidCoordinates
Invalid coordinates
InvalidBbox
Invalid bounding box
DbfError
DBF parsing error
Fields
InvalidDbfHeader
Invalid DBF header
InvalidFieldDescriptor
Invalid field descriptor
InvalidFieldValue
Invalid field value
EncodingError
Encoding error
ShxError
SHX index error
RecordMismatch
Record mismatch between .shp and .dbf
Fields
MissingFile
Missing required file
Io(Error)
I/O error
UnexpectedEof
EOF (End of File) error
Validation
Validation error
Topology
Topology error
OutOfMemory
Out of memory error
LimitExceeded
Limit exceeded
Fields
OxiGdal(OxiGdalError)
Generic OxiGDAL error
Implementations§
Source§impl ShapefileError
impl ShapefileError
Sourcepub fn invalid_header<S: Into<String>>(message: S) -> Self
pub fn invalid_header<S: Into<String>>(message: S) -> Self
Creates a new invalid header error
Sourcepub fn invalid_geometry<S: Into<String>>(message: S) -> Self
pub fn invalid_geometry<S: Into<String>>(message: S) -> Self
Creates a new invalid geometry error
Sourcepub fn invalid_geometry_at<S: Into<String>>(message: S, record: usize) -> Self
pub fn invalid_geometry_at<S: Into<String>>(message: S, record: usize) -> Self
Creates a new invalid geometry error with record number
Sourcepub fn invalid_coordinates<S: Into<String>>(message: S) -> Self
pub fn invalid_coordinates<S: Into<String>>(message: S) -> Self
Creates a new invalid coordinates error
Sourcepub fn invalid_coordinates_at<S: Into<String>>(
message: S,
position: usize,
) -> Self
pub fn invalid_coordinates_at<S: Into<String>>( message: S, position: usize, ) -> Self
Creates a new invalid coordinates error with position
Sourcepub fn dbf_error_at<S: Into<String>, F: Into<String>>(
message: S,
field: F,
record: usize,
) -> Self
pub fn dbf_error_at<S: Into<String>, F: Into<String>>( message: S, field: F, record: usize, ) -> Self
Creates a new DBF error with field and record
Sourcepub fn encoding_error<S: Into<String>>(message: S) -> Self
pub fn encoding_error<S: Into<String>>(message: S) -> Self
Creates a new encoding error
Sourcepub fn validation<S: Into<String>>(message: S) -> Self
pub fn validation<S: Into<String>>(message: S) -> Self
Creates a new validation error
Sourcepub fn validation_at<S: Into<String>, P: Into<String>>(
message: S,
path: P,
) -> Self
pub fn validation_at<S: Into<String>, P: Into<String>>( message: S, path: P, ) -> Self
Creates a new validation error with path
Sourcepub fn limit_exceeded<S: Into<String>>(
message: S,
limit: usize,
actual: usize,
) -> Self
pub fn limit_exceeded<S: Into<String>>( message: S, limit: usize, actual: usize, ) -> Self
Creates a new limit exceeded error
Sourcepub fn unexpected_eof<S: Into<String>>(message: S) -> Self
pub fn unexpected_eof<S: Into<String>>(message: S) -> Self
Creates a new unexpected EOF error
Trait Implementations§
Source§impl Debug for ShapefileError
impl Debug for ShapefileError
Source§impl Display for ShapefileError
impl Display for ShapefileError
Source§impl Error for ShapefileError
impl Error for ShapefileError
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()