Skip to main content

StaticTemporalNavigationSelection

Enum StaticTemporalNavigationSelection 

Source
pub enum StaticTemporalNavigationSelection {
    Natal,
    PreDecadal,
    Decadal {
        decadal_index: usize,
    },
    Yearly {
        decadal_index: usize,
        year_index: u8,
    },
    Monthly {
        decadal_index: usize,
        year_index: u8,
        month_index: u8,
    },
    Daily {
        decadal_index: usize,
        year_index: u8,
        month_index: u8,
        day_index: u8,
    },
    Hourly {
        decadal_index: usize,
        year_index: u8,
        month_index: u8,
        day_index: u8,
        hour_index: u8,
    },
}
Expand description

A renderer-neutral, hierarchical drill-down selection for the bottom panel.

A renderer (TUI/GUI) reports which bottom-panel cell the user chose as an index path (大限 → 流年 → 流月 → 流日 → 流时); core resolves the indices to concrete lunar/solar coordinates and prepares the matching StaticChartViewSnapshot. Each deeper variant carries its ancestors’ indices. The renderer never derives the overlay, the lunar labels, or the month/day validity itself.

Indices: year_index 0..=9 (within the 大限’s 10 years); month_index 0..=11 (lunar month 正月..腊月); day_index 0..=29 (lunar day 初一..三十); hour_index 0..=11 (double-hour 子..亥).

Variants§

§

Natal

本命 — the natal slice with no temporal overlay.

§

PreDecadal

限前 — the span before the first 大限. Carries no overlay; natal base.

§

Decadal

大限 — the selected decadal period; enables the 流年 row.

Fields

§decadal_index: usize

Zero-based index into the decadal frame periods.

§

Yearly

流年/小限 — a year within the selected 大限; enables the 流月 row.

Fields

§decadal_index: usize

Selected decadal period index.

§year_index: u8

Zero-based year within the period (0..=9).

§

Monthly

流月 — a lunar month of the selected 流年; enables the 流日 row.

Fields

§decadal_index: usize

Selected decadal period index.

§year_index: u8

Selected year within the period (0..=9).

§month_index: u8

Zero-based lunar month (0..=11 -> 正月..腊月).

§

Daily

流日 — a lunar day of the selected 流月; enables the 流时 row.

Fields

§decadal_index: usize

Selected decadal period index.

§year_index: u8

Selected year within the period (0..=9).

§month_index: u8

Selected lunar month (0..=11).

§day_index: u8

Zero-based lunar day (0..=29 -> 初一..三十).

§

Hourly

流时 — a double-hour of the selected 流日.

Fields

§decadal_index: usize

Selected decadal period index.

§year_index: u8

Selected year within the period (0..=9).

§month_index: u8

Selected lunar month (0..=11).

§day_index: u8

Selected lunar day (0..=29).

§hour_index: u8

Zero-based double-hour (0..=11 -> 子..亥).

Implementations§

Source§

impl StaticTemporalNavigationSelection

Source

pub const fn decadal_index(&self) -> Option<usize>

The selected decadal period index, if the path reaches 大限.

Source

pub const fn year_index(&self) -> Option<u8>

The selected year index, if the path reaches 流年.

Source

pub const fn month_index(&self) -> Option<u8>

The selected lunar-month index, if the path reaches 流月.

Source

pub const fn day_index(&self) -> Option<u8>

The selected lunar-day index, if the path reaches 流日.

Source

pub const fn hour_index(&self) -> Option<u8>

The selected double-hour index, if the path reaches 流时.

Trait Implementations§

Source§

impl Clone for StaticTemporalNavigationSelection

Source§

fn clone(&self) -> StaticTemporalNavigationSelection

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for StaticTemporalNavigationSelection

Source§

impl Debug for StaticTemporalNavigationSelection

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for StaticTemporalNavigationSelection

Source§

fn default() -> StaticTemporalNavigationSelection

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for StaticTemporalNavigationSelection

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for StaticTemporalNavigationSelection

Source§

impl Hash for StaticTemporalNavigationSelection

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for StaticTemporalNavigationSelection

Source§

fn eq(&self, other: &StaticTemporalNavigationSelection) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for StaticTemporalNavigationSelection

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for StaticTemporalNavigationSelection

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.