Skip to main content

pleiades_types/
lib.rs

1//! Shared primitive and domain-adjacent types used across the workspace.
2//!
3//! These types define the vocabulary for angles, time scales, celestial body
4//! identifiers, observer locations, coordinate frames, and catalog selections.
5//! Higher-level crates build on these semantics without re-labelling the same
6//! concepts in backend-specific ways.
7//!
8//! Enable the optional `serde` feature to serialize and deserialize the public
9//! type vocabulary for interchange or caching workflows.
10//!
11//! # Examples
12//!
13//! ```
14//! use pleiades_types::{Angle, Longitude};
15//!
16//! let angle = Angle::from_degrees(-30.0);
17//! assert_eq!(angle.normalized_0_360().degrees(), 330.0);
18//!
19//! let lon = Longitude::from_degrees(390.0);
20//! assert_eq!(lon.degrees(), 30.0);
21//! ```
22
23#![forbid(unsafe_code)]
24#![deny(missing_docs)]
25
26mod angles;
27mod ayanamsa;
28mod bodies;
29mod compatibility_claim;
30mod coordinates;
31mod custom_bodies;
32mod frames;
33mod house_systems;
34mod motion;
35mod observer;
36mod time;
37mod time_range;
38mod zodiac;
39
40pub use angles::{Angle, Latitude, Longitude};
41pub use ayanamsa::{Ayanamsa, CustomAyanamsa};
42pub use bodies::{CelestialBody, CelestialBodyClass};
43pub use compatibility_claim::CompatibilityClaimTier;
44pub use coordinates::{CoordinateValidationError, EclipticCoordinates, EquatorialCoordinates};
45pub use custom_bodies::{CustomBodyId, CustomDefinitionValidationError};
46pub use frames::{Apparentness, CoordinateFrame};
47pub use house_systems::{CustomHouseSystem, HouseSystem};
48pub use motion::{Motion, MotionDirection, MotionValidationError};
49pub use observer::{ObserverLocation, ObserverLocationValidationError};
50pub use time::{
51    Instant, JulianDay, TimeScale, TimeScaleConversion, TimeScaleConversionError,
52    OBLIQUITY_J2000_DEG, SECONDS_PER_DAY,
53};
54pub use time_range::{TimeRange, TimeRangeValidationError};
55pub use zodiac::{SiderealStarPlace, ZodiacMode, ZodiacSign};
56
57#[cfg(test)]
58mod tests;