Skip to main content

Palace

Struct Palace 

Source
pub struct Palace {
    pub number: u8,
    pub direction: Direction,
    pub trigram: Option<Trigram>,
    pub element: Element,
    pub earth_stem: Stem,
    pub hosted_earth_stem: Option<Stem>,
    pub heaven_stems: Vec<HeavenStem>,
    pub stars: Vec<Star>,
    pub door: Option<Door>,
    pub deity: Option<Deity>,
    pub void_branches: Vec<Branch>,
    pub is_horse: bool,
}
Expand description

All fixed and moving components of one Luo Shu palace.

Fields§

§number: u8

Luo Shu number, one through nine; the output array is in this order.

§direction: Direction

Geographic direction (the center has its own value).

§trigram: Option<Trigram>

Later Heaven trigram; absent for the center.

§element: Element

Fixed palace element.

§earth_stem: Stem

Native earth-plate stem, including the actual center stem at palace five.

§hosted_earth_stem: Option<Stem>

Additional center earth stem hosted at 坤二; absent elsewhere.

§heaven_stems: Vec<HeavenStem>

Rotated heavenly-plate stems; two with 天芮/天禽, none at the center.

§stars: Vec<Star>

Moving stars; two with 天芮/天禽, none at the center.

§door: Option<Door>

Moving door; absent at the center.

§deity: Option<Deity>

Moving deity; absent at the center.

§void_branches: Vec<Branch>

Hour-pillar void branches contained in this palace; may hold both.

§is_horse: bool

Whether the hour-branch travelling horse occupies this palace.

Trait Implementations§

Source§

impl Clone for Palace

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 Debug for Palace

Source§

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

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

impl<'de> Deserialize<'de> for Palace

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 Palace

Source§

impl PartialEq for Palace

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl Serialize for Palace

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 Palace

Auto Trait Implementations§

§

impl Forget for Palace

§

impl Freeze for Palace

§

impl Move for Palace

§

impl RefUnwindSafe for Palace

§

impl Send for Palace

§

impl Sync for Palace

§

impl Unpin for Palace

§

impl UnsafeUnpin for Palace

§

impl UnwindSafe for Palace

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 = !

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.