pub struct Moment {}Expand description
时刻的共享天文/历法上下文:对一个出生/问事时刻,把所有「时间→天文量」的公共子计算 (儒略日、力学时、太阳视黄经、民用日序、农历)一次性算出并缓存。
这是「树即记忆化计算 DAG」的共享层:多片叶子(八字、紫微、择日…)共用同一个 Moment,
避免各自重复昂贵的日月历法计算。各叶以 compute_at(&Moment) 复用它。
Fields§
§year: i32公历年。
month: u32公历月 1..12。
day: u32公历日 1..31。
hour: u32时 0..23。
minute: u32分 0..59。
tz: f64时区偏移小时。
jd_ut: f64世界时儒略日。
jde: f64力学时儒略日(含 ΔT)。
sun_longitude: f64太阳视黄经(度)。
sidereal_time: f64格林尼治平恒星时(度)——B 族算上升点/中天的共享量。
obliquity: f64黄道平交角 ε₀(度)——B 族算上升点/中天的共享量。
civil_day: i64民用日序(JDN)。
lunar: LunarDate农历日期。
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Moment
impl RefUnwindSafe for Moment
impl Send for Moment
impl Sync for Moment
impl Unpin for Moment
impl UnsafeUnpin for Moment
impl UnwindSafe for Moment
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more