pub enum AlgorithmError {
Show 15 variants
Core(OxiGdalError),
InvalidDimensions {
message: &'static str,
actual: usize,
expected: usize,
},
EmptyInput {
operation: &'static str,
},
InvalidInput(String),
InvalidParameter {
parameter: &'static str,
message: String,
},
InvalidGeometry(String),
IncompatibleTypes {
source_type: &'static str,
target_type: &'static str,
},
InsufficientData {
operation: &'static str,
message: String,
},
NumericalError {
operation: &'static str,
message: String,
},
ComputationError(String),
GeometryError {
message: String,
},
UnsupportedOperation {
operation: String,
},
AllocationFailed {
message: String,
},
SimdNotAvailable,
PathNotFound(String),
}Expand description
Algorithm-specific errors
Variants§
Core(OxiGdalError)
Core OxiGDAL error
InvalidDimensions
Invalid dimensions
Fields
EmptyInput
Empty input
InvalidInput(String)
Invalid input
InvalidParameter
Invalid parameter
InvalidGeometry(String)
Invalid geometry
IncompatibleTypes
Incompatible data types
InsufficientData
Insufficient data
NumericalError
Numerical error
ComputationError(String)
Computation error
GeometryError
Geometry error
UnsupportedOperation
Unsupported operation
AllocationFailed
Allocation failed
SimdNotAvailable
SIMD not available
PathNotFound(String)
Path not found
Implementations§
Source§impl AlgorithmError
impl AlgorithmError
Sourcepub fn code(&self) -> &'static str
pub fn code(&self) -> &'static str
Get the error code for this algorithm 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 algorithm error
Returns a human-readable suggestion including parameter constraints and valid ranges.
Sourcepub fn context(&self) -> ErrorContext
pub fn context(&self) -> ErrorContext
Get additional context about this algorithm error
Returns structured context information including parameter names and values.
Trait Implementations§
Source§impl Debug for AlgorithmError
impl Debug for AlgorithmError
Source§impl Display for AlgorithmError
impl Display for AlgorithmError
Source§impl Error for AlgorithmError
impl Error for AlgorithmError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<OxiGdalError> for AlgorithmError
impl From<OxiGdalError> for AlgorithmError
Source§fn from(source: OxiGdalError) -> Self
fn from(source: OxiGdalError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AlgorithmError
impl RefUnwindSafe for AlgorithmError
impl Send for AlgorithmError
impl Sync for AlgorithmError
impl Unpin for AlgorithmError
impl UnsafeUnpin for AlgorithmError
impl UnwindSafe for AlgorithmError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more