1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! Error type for `target-match`.
//!
//! Every fallible entry point returns [`Result`]. The only construction this
//! crate itself validates is optics/field geometry — coordinate parsing and
//! domain checks happen in [`skymath`] when the consumer builds an
//! [`skymath::Equatorial`], and surface as [`skymath::Error`]. Matching and
//! precession are infallible once inputs are valid values.
use Error;
/// 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(_)));
/// ```
/// Convenience alias for `Result<T, `[`Error`](enum@Error)`>`.
pub type Result<T> = Result;