#[non_exhaustive]pub enum Error {
Show 15 variants
InvalidTolerance {
absolute: f64,
relative: f64,
},
NonFiniteComponent {
component: Component,
value: f64,
},
NegativeComponent {
component: Component,
value: f64,
tolerance: f64,
},
InvalidSum {
sum: f64,
minimum: f64,
},
InvalidRequiredSum {
required_sum: f64,
minimum: f64,
},
RequiredSumMismatch {
expected: f64,
actual: f64,
tolerance: Tolerance,
},
InvalidVertexOrder {
left: Component,
right: Component,
apex: Component,
},
NonFiniteCartesian {
x: f64,
y: f64,
},
CartesianOutsideTriangle {
x: f64,
y: f64,
tolerance: Tolerance,
},
NonFiniteViewportBounds {
x_min: f64,
x_max: f64,
y_min: f64,
y_max: f64,
},
InvalidViewport {
x_min: f64,
x_max: f64,
y_min: f64,
y_max: f64,
minimum_span: f64,
},
InvalidPixelRect {
x: i32,
y: i32,
width: u32,
height: u32,
},
NonFinitePixelCoordinate {
x: f64,
y: f64,
},
NonFiniteSegment {
start_x: f64,
start_y: f64,
end_x: f64,
end_y: f64,
},
InvalidIsolineValue {
value: f64,
tolerance: Tolerance,
},
}Expand description
Errors reported by composition validation and geometric projection.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidTolerance
A tolerance has a non-finite or non-positive term.
NonFiniteComponent
A composition component is NaN or infinite.
NegativeComponent
A composition component is negative by more than the absolute tolerance.
InvalidSum
A composition sum is non-finite, zero, or too close to zero.
InvalidRequiredSum
A custom required sum is non-finite or too close to zero.
RequiredSumMismatch
A composition does not have the sum required by its policy.
InvalidVertexOrder
A vertex order repeats one or more components.
NonFiniteCartesian
A Cartesian coordinate is NaN or infinite.
CartesianOutsideTriangle
A Cartesian point is materially outside the complete ternary triangle.
NonFiniteViewportBounds
One or more logical viewport bounds are NaN or infinite.
InvalidViewport
A viewport range is reversed, zero, near-zero, or otherwise unusable.
InvalidPixelRect
An allocated pixel rectangle has a zero width or height.
NonFinitePixelCoordinate
A floating-point pixel coordinate is NaN or infinite.
NonFiniteSegment
At least one endpoint of a Cartesian segment is NaN or infinite.
InvalidIsolineValue
A component-isoline value is materially outside the unit interval.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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
use the Display impl or to_string()