pub enum AlgorithmError {
Show 16 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),
NestingTooDeep {
context: &'static str,
depth: usize,
max: usize,
},
}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
NestingTooDeep
Expression nesting depth exceeded
Raised by the raster-algebra expression front-ends when an input
expression nests more deeply than crate::MAX_EXPRESSION_DEPTH.
The limit exists so that untrusted expressions cannot exhaust the
thread stack via unbounded recursive descent.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
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
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more