Skip to main content

FengShui

Struct FengShui 

Source
pub struct FengShui<'a>(/* private fields */);
Expand description

Compute classical feng shui from one API: Xuan Kong flying star natal charts for any of the nine periods and 24 mountains, Kua numbers and the full Eight Mansions map of favourable and unfavourable directions, annual and monthly star plates, the four annual afflictions with exact degree spans, the compass Bagua map and the 1864 to 2043 period table. Chinese years resolve at Li Chun, computed astronomically, so the boundary is right rather than assumed. One key covers every RoxyAPI domain, with Remote MCP and typed SDKs.

Implementations§

Source§

impl FengShui<'_>

Source

pub async fn calculate_kua_number( &self, params: &CalculateKuaNumberParams, body: &CalculateKuaNumberRequest, ) -> Result<CalculateKuaNumberResponse, Error>

Calculate Kua number - Feng shui personal direction calculator API

Calculate the Kua number, also called the Ming Gua or life gua, from a birth date and sex. Returns the number, the east or west life group, the personal trigram, and all eight compass sectors classified from best to worst. The Chinese year is resolved at Li Chun by default, so an early February birthday is placed in the correct year rather than the calendar one, and the boundary that decided it is echoed back. Built for room and desk placement features, personalised feng shui reports, and any product that needs a favourable direction per person.

POST /feng-shui/kua

Source

pub async fn generate_eight_mansions( &self, params: &GenerateEightMansionsParams, body: &GenerateEightMansionsRequest, ) -> Result<GenerateEightMansionsResponse, Error>

Generate Eight Mansions map - Ba Zhai lucky direction API

Build the full Eight Mansions (Ba Zhai) map for a person: all eight compass sectors classified into the four favourable stars, Sheng Chi, Tian Yi, Yan Nian and Fu Wei, and the four unfavourable ones, Huo Hai, Wu Gui, Liu Sha and Jue Ming. Sectors come back ordered best to worst with a composed reading each, plus the ranking that decides which affliction to accept when no favourable sector is reachable. Accepts a Kua number directly or derives one from a birth date and sex. Built for bed and desk placement tools, room-by-room reports and floor plan overlays.

POST /feng-shui/eight-mansions

Source

pub async fn generate_flying_star_chart( &self, params: &GenerateFlyingStarChartParams, body: &GenerateFlyingStarChartRequest, ) -> Result<GenerateFlyingStarChartResponse, Error>

Generate flying star natal chart - Xuan Kong Fei Xing API

Cast the Xuan Kong flying star natal chart for a building from its construction period and the direction it faces. Returns all nine palaces with the period star, the mountain star that governs health and relationships and the water star that governs wealth, plus the named formation and a composed reading for every palace, and the classical verdict on how the two prosperous stars landed. Facing is accepted as one of the 24 mountains or as a compass bearing. Built for property analysis tools, floor plan overlays and consultation software.

POST /feng-shui/flying-stars/natal

Source

pub async fn get_annual_afflictions( &self, params: &GetAnnualAfflictionsParams, ) -> Result<GetAnnualAfflictionsResponse, Error>

Annual afflictions - Tai Sui, San Sha and Five Yellow API

Return the four annual feng shui afflictions for a solar year with their exact positions: Tai Sui on the mountain of the year branch, Sui Po on the mountain opposite, the Three Killings across the cardinal span opposite the elemental frame of the year, and the Five Yellow wherever it lands on the annual star plate. Positions come with degree ranges rather than only sector names, because Tai Sui occupies 15 degrees and the neighbouring mountains of the same sector are unaffected. All four move at Li Chun in early February, not at Lunar New Year, and the changeover date is returned. Built for renovation planning, date selection and yearly guidance features.

GET /feng-shui/afflictions/{year}

Source

pub async fn get_annual_flying_stars( &self, params: &GetAnnualFlyingStarsParams, ) -> Result<GetAnnualFlyingStarsResponse, Error>

Annual flying stars - Yearly feng shui star chart API

Return the annual flying star plate for a solar year: which of the nine stars occupies each of the nine palaces, what it means there, and which element strengthens or drains it. The annual plate is universal and does not depend on any building, so it is the layer every yearly feng shui guide is built on. The changeover is Li Chun in early February rather than Lunar New Year, and the exact date is returned so a caller can apply the plate on the right day.

GET /feng-shui/flying-stars/annual/{year}

Source

pub async fn get_bagua_sector( &self, params: &GetBaguaSectorParams, ) -> Result<GetBaguaSectorResponse, Error>

Look up a Bagua sector - Life area reference API

Look up one palace of the compass Bagua map by its life area id, such as wealth, career or love. Returns the compass sector it occupies, its five phase and colours, both trigram arrangements and what the sector governs. The health palace is the centre and carries no direction and no trigram, because the centre of the Lo Shu is not a trigram.

GET /feng-shui/bagua/{id}

Source

pub async fn get_kua_number( &self, params: &GetKuaNumberParams, ) -> Result<GetKuaNumberResponse, Error>

Look up a Kua number - Eight Mansions reference API

Look up the reference chart for one Kua number: its trigram, its east or west life group, and how it classifies all eight compass sectors. A pure reference endpoint with no birth data required, for building a lookup table or a picker. Number 5 is served for completeness and is never a computed result, because it belongs to the centre and has no direction of its own: a man whose formula gives 5 reads Kua 2 and a woman reads Kua 8, and the chart returned for 5 is therefore the Kua 2 chart.

GET /feng-shui/kua/{number}

Source

pub async fn get_monthly_flying_stars( &self, params: &GetMonthlyFlyingStarsParams, ) -> Result<GetMonthlyFlyingStarsResponse, Error>

Monthly flying stars - Month by month feng shui overlay API

Return the monthly flying star plate, the faster overlay that sits on top of the annual one. Months here are SOLAR months: month 1 begins at Li Chun in early February and each month begins at the next of the twelve major solar terms, so they never line up with calendar months. Omit both parameters to get the month in progress. Built for monthly guidance features and for timing work around an affliction that only lands for part of the year.

GET /feng-shui/flying-stars/monthly

Source

pub async fn list_bagua_sectors( &self, params: &ListBaguaSectorsParams, ) -> Result<ListBaguaSectorsResponse, Error>

List Bagua sectors - Feng shui bagua map API

The nine palaces of the compass Bagua map: the eight trigram sectors plus the centre, each with the life area it governs, its five phase, its colours, and both its Later Heaven and Earlier Heaven trigrams. This is the compass map aligned to true directions, so career is always North and wealth is always Southeast whichever way the entrance faces. Trigram details are served from the same source as the I-Ching trigram endpoints, so the two agree field for field. Built for floor plan overlays, room-by-room guides and any interface that maps a space onto life areas.

GET /feng-shui/bagua

Source

pub async fn list_flying_stars( &self, params: &ListFlyingStarsParams, ) -> Result<ListFlyingStarsResponse, Error>

List the nine flying stars - Xuan Kong star reference API

The reference catalogue of the nine flying stars: name, Chinese characters, five phase, home palace and trigram, the period each rules, what each means, and which element strengthens or drains it. The remedy element is what the star itself produces, because a harmful star is drained by giving it somewhere to go rather than fought with the phase that controls it. A pure reference endpoint that needs no chart.

GET /feng-shui/flying-stars/stars

Source

pub async fn list_nine_periods( &self, params: &ListNinePeriodsParams, ) -> Result<ListNinePeriodsResponse, Error>

List the nine periods - San Yuan period table API

The nine twenty year periods of the 180 year San Yuan cycle from 1864 to 2043, each with its ruling star, five phase, palace and the exact Li Chun date it opened, plus which period is in force on a given date. A building takes the period it was completed in and keeps that period plate for life, so this is the table that decides which natal chart a property gets. Period 9 opened on 4 February 2024, which means a building finished in January 2024 is still a Period 8 building.

GET /feng-shui/periods

Trait Implementations§

Source§

impl<'a> Clone for FengShui<'a>

Source§

fn clone(&self) -> Self

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<'a> Copy for FengShui<'a>

Source§

impl<'a> Debug for FengShui<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for FengShui<'a>

§

impl<'a> !UnwindSafe for FengShui<'a>

§

impl<'a> Freeze for FengShui<'a>

§

impl<'a> Send for FengShui<'a>

§

impl<'a> Sync for FengShui<'a>

§

impl<'a> Unpin for FengShui<'a>

§

impl<'a> UnsafeUnpin for FengShui<'a>

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more