#[non_exhaustive]pub enum Error {
InvalidOptics(String),
InvalidFootprint {
provenance: String,
reason: String,
},
FootprintEpochMismatch,
AntipodalGeometry,
ProjectionFailed(String),
EmptyFootprintSet,
DuplicateFootprintProvenance(String),
InvalidCoverageBand(String),
InvalidRotationSearch(String),
InvalidEllipse(String),
InvalidObjectGeometry(String),
}Expand description
Everything that can go wrong constructing target-match values.
§Example
use target_match::{Error, Field, Optics};
let err = Field::from_optics(Optics {
focal_mm: 0.0, pixel_um: (3.76, 3.76), binning: (1, 1), pixels: (6248, 4176),
})
.unwrap_err();
assert!(matches!(err, Error::InvalidOptics(_)));Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidOptics(String)
Optics or field inputs were non-positive, non-finite, or insufficient to derive a field of view.
InvalidFootprint
An ordered captured boundary is degenerate, self-intersecting, or does not contain its declared centre.
FootprintEpochMismatch
Compared geometry uses different coordinate epochs.
AntipodalGeometry
A common tangent anchor cannot be selected for antipodal geometry.
ProjectionFailed(String)
A point is at or beyond the selected gnomonic projection horizon.
EmptyFootprintSet
A footprint union requires at least one input.
DuplicateFootprintProvenance(String)
Per-panel evidence requires unique provenance identities.
InvalidCoverageBand(String)
A normalized coverage band is non-finite, reversed, or outside [0, 1].
InvalidRotationSearch(String)
A residual-rotation search domain or resolution is invalid.
InvalidEllipse(String)
An ellipse has invalid axes, orientation, or sampling resolution.
InvalidObjectGeometry(String)
Caller-supplied object geometry cannot produce a positive planar area.
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()