Skip to main content

target_match/
lib.rs

1#![doc = include_str!("../README.md")]
2// This Source Code Form is subject to the terms of the Mozilla Public
3// License, v. 2.0. If a copy of the MPL was not distributed with this
4// file, You can obtain one at https://mozilla.org/MPL/2.0/.
5
6//!
7//! # Modules
8//!
9//! - [`optics`] — plate scale and field-of-view geometry from focal length,
10//!   pixel size (x/y), binning (x/y), and sensor dimensions — or a directly
11//!   supplied pixel scale / field of view — plus the search-radius policies.
12//! - [`matcher`] — the `SkyObject` input trait, match constraints (radius,
13//!   rectangular field of view, nearest-N), and deterministic ranking.
14//! - [`guide`] — a task-oriented walkthrough, from implementing `SkyObject`
15//!   through repeated queries with `Matcher`.
16
17pub mod error;
18pub mod matcher;
19pub mod optics;
20
21/// A task-oriented walkthrough of `target-match`, from implementing
22/// [`SkyObject`] through repeated queries with [`Matcher`]. Source:
23/// [`docs/guide.md`](https://github.com/nightwatch-astro/target-match/blob/main/docs/guide.md).
24#[doc = include_str!("../docs/guide.md")]
25pub mod guide {}
26
27/// The astronomy-math crate whose types appear in this crate's public API,
28/// re-exported so consumers can use the exact version target-match was built
29/// against.
30pub use skymath;
31
32// `#[doc(inline)]` puts each item's canonical rustdoc page at the crate root
33// (`target_match::Foo`), matching how these re-exports are used. Without it,
34// because the source modules are public, rustdoc keeps the page under the
35// submodule path (`target_match/matcher/…`) and crate-root links 404.
36#[doc(inline)]
37pub use error::{Error, Result};
38#[doc(inline)]
39pub use matcher::{
40    is_framed, rank, Constraint, Match, Matcher, Membership, Offset, Query, SkyObject,
41};
42#[doc(inline)]
43pub use optics::{
44    Field, Optics, RadiusPolicy, ARCSEC_PER_DEGREE, ARCSEC_PER_RADIAN, DEFAULT_FALLBACK_RADIUS,
45};