pub enum OxiGdalError {
Io(IoError),
Format(FormatError),
Crs(CrsError),
Compression(CompressionError),
InvalidParameter {
parameter: &'static str,
message: String,
},
NotSupported {
operation: String,
},
OutOfBounds {
message: String,
},
Internal {
message: String,
},
}Expand description
The main error type for OxiGDAL
Variants§
Io(IoError)
I/O error occurred
Format(FormatError)
Invalid data format
Crs(CrsError)
Coordinate reference system error
Compression(CompressionError)
Compression/decompression error
InvalidParameter
Invalid parameter
NotSupported
Operation not supported
OutOfBounds
Out of bounds access
Internal
Internal error
Implementations§
Source§impl OxiGdalError
impl OxiGdalError
Sourcepub fn allocation_error(message: impl Into<String>) -> OxiGdalError
pub fn allocation_error(message: impl Into<String>) -> OxiGdalError
Create an allocation error
Sourcepub fn allocation_error_builder(message: impl Into<String>) -> ErrorBuilder
pub fn allocation_error_builder(message: impl Into<String>) -> ErrorBuilder
Create an allocation error builder with rich context
Sourcepub fn invalid_state(message: impl Into<String>) -> OxiGdalError
pub fn invalid_state(message: impl Into<String>) -> OxiGdalError
Create an invalid state error
Sourcepub fn invalid_state_builder(message: impl Into<String>) -> ErrorBuilder
pub fn invalid_state_builder(message: impl Into<String>) -> ErrorBuilder
Create an invalid state error builder with rich context
Sourcepub fn invalid_operation(message: impl Into<String>) -> OxiGdalError
pub fn invalid_operation(message: impl Into<String>) -> OxiGdalError
Create an invalid operation error
Sourcepub fn invalid_operation_builder(message: impl Into<String>) -> ErrorBuilder
pub fn invalid_operation_builder(message: impl Into<String>) -> ErrorBuilder
Create an invalid operation error builder with rich context
Sourcepub fn io_error(message: impl Into<String>) -> OxiGdalError
pub fn io_error(message: impl Into<String>) -> OxiGdalError
Create an I/O error from a message
Sourcepub fn io_error_builder(message: impl Into<String>) -> ErrorBuilder
pub fn io_error_builder(message: impl Into<String>) -> ErrorBuilder
Create an I/O error builder with rich context
Sourcepub fn invalid_parameter(
parameter: &'static str,
message: impl Into<String>,
) -> OxiGdalError
pub fn invalid_parameter( parameter: &'static str, message: impl Into<String>, ) -> OxiGdalError
Create an invalid parameter error with parameter name
Sourcepub fn invalid_parameter_builder(
parameter: &'static str,
message: impl Into<String>,
) -> ErrorBuilder
pub fn invalid_parameter_builder( parameter: &'static str, message: impl Into<String>, ) -> ErrorBuilder
Create an invalid parameter error builder with rich context
Sourcepub fn not_supported(operation: impl Into<String>) -> OxiGdalError
pub fn not_supported(operation: impl Into<String>) -> OxiGdalError
Create a not supported error
Sourcepub fn not_supported_builder(operation: impl Into<String>) -> ErrorBuilder
pub fn not_supported_builder(operation: impl Into<String>) -> ErrorBuilder
Create a not supported error builder with rich context
Sourcepub fn from_path(path: &Path, kind: ErrorKind) -> OxiGdalError
Available on crate feature std only.
pub fn from_path(path: &Path, kind: ErrorKind) -> OxiGdalError
std only.Create an I/O error from a file path
Sourcepub fn from_path_builder(path: &Path, kind: ErrorKind) -> ErrorBuilder
Available on crate feature std only.
pub fn from_path_builder(path: &Path, kind: ErrorKind) -> ErrorBuilder
std only.Create an I/O error builder from a file path with rich context
Sourcepub fn code(&self) -> &'static str
pub fn code(&self) -> &'static str
Get the error code for this error
Error codes are stable across versions and can be used for documentation and error handling.
Sourcepub fn suggestion(&self) -> Option<&'static str>
pub fn suggestion(&self) -> Option<&'static str>
Get a helpful suggestion for fixing this error
Returns a human-readable suggestion that can help users resolve the error.
Sourcepub fn context(&self) -> ErrorContext
pub fn context(&self) -> ErrorContext
Get additional context about this error
Returns structured context information that can help with debugging.
Trait Implementations§
Source§impl Debug for OxiGdalError
impl Debug for OxiGdalError
Source§impl Display for OxiGdalError
impl Display for OxiGdalError
Source§impl Error for OxiGdalError
impl Error for OxiGdalError
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
Source§impl From<CompressionError> for OxiGdalError
impl From<CompressionError> for OxiGdalError
Source§fn from(err: CompressionError) -> OxiGdalError
fn from(err: CompressionError) -> OxiGdalError
Source§impl From<CrsError> for OxiGdalError
impl From<CrsError> for OxiGdalError
Source§fn from(err: CrsError) -> OxiGdalError
fn from(err: CrsError) -> OxiGdalError
Source§impl From<Error> for OxiGdalError
Available on crate feature std only.
impl From<Error> for OxiGdalError
std only.Source§fn from(err: Error) -> OxiGdalError
fn from(err: Error) -> OxiGdalError
Source§impl From<ErrorBuilder> for OxiGdalError
Convert ErrorBuilder into OxiGdalError
impl From<ErrorBuilder> for OxiGdalError
Convert ErrorBuilder into OxiGdalError