pub enum EarthlyBranch {
First,
Second,
Third,
Fourth,
Fifth,
Sixth,
Seventh,
Eighth,
Ninth,
Tenth,
Eleventh,
Twelfth,
}
Expand description
列舉中國十二地支:子、丑、寅、卯、辰、巳、午、未、申、酉、戌、亥。
Variants§
First
子
Second
丑
Third
寅
Fourth
卯
Fifth
辰
Sixth
巳
Seventh
午
Eighth
未
Ninth
申
Tenth
酉
Eleventh
戌
Twelfth
亥
Implementations§
source§impl EarthlyBranch
impl EarthlyBranch
pub unsafe fn from_ordinal_unsafe(number: i8) -> EarthlyBranch
sourcepub fn from_time<T: Timelike>(time: T) -> EarthlyBranch
pub fn from_time<T: Timelike>(time: T) -> EarthlyBranch
將時間轉成對應的地支。
sourcepub fn from_str<S: AsRef<str>>(s: S) -> Option<EarthlyBranch>
pub fn from_str<S: AsRef<str>>(s: S) -> Option<EarthlyBranch>
透過子、丑、寅、卯、辰、巳、午、未、申、酉、戌、亥等字串來取得 EarthlyBranch
列舉實體。
sourcepub fn from_char(c: char) -> Option<EarthlyBranch>
pub fn from_char(c: char) -> Option<EarthlyBranch>
透過子、丑、寅、卯、辰、巳、午、未、申、酉、戌、亥等字元來取得 EarthlyBranch
列舉實體。
sourcepub fn from_zodiac(zodiac: Zodiac) -> EarthlyBranch
pub fn from_zodiac(zodiac: Zodiac) -> EarthlyBranch
透過生肖來取得地支。
sourcepub fn get_ba_zi_weight(&self) -> u8
pub fn get_ba_zi_weight(&self) -> u8
取得八字重量。
Trait Implementations§
source§impl Clone for EarthlyBranch
impl Clone for EarthlyBranch
source§fn clone(&self) -> EarthlyBranch
fn clone(&self) -> EarthlyBranch
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for EarthlyBranch
impl Debug for EarthlyBranch
source§impl Display for EarthlyBranch
impl Display for EarthlyBranch
source§impl From<EarthlyBranch> for Zodiac
impl From<EarthlyBranch> for Zodiac
source§fn from(earthly_branch: EarthlyBranch) -> Zodiac
fn from(earthly_branch: EarthlyBranch) -> Zodiac
Converts to this type from the input type.
source§impl From<Zodiac> for EarthlyBranch
impl From<Zodiac> for EarthlyBranch
source§fn from(zodiac: Zodiac) -> EarthlyBranch
fn from(zodiac: Zodiac) -> EarthlyBranch
Converts to this type from the input type.
source§impl Hash for EarthlyBranch
impl Hash for EarthlyBranch
source§impl Ord for EarthlyBranch
impl Ord for EarthlyBranch
source§fn cmp(&self, other: &EarthlyBranch) -> Ordering
fn cmp(&self, other: &EarthlyBranch) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<EarthlyBranch> for EarthlyBranch
impl PartialEq<EarthlyBranch> for EarthlyBranch
source§fn eq(&self, other: &EarthlyBranch) -> bool
fn eq(&self, other: &EarthlyBranch) -> bool
source§impl PartialOrd<EarthlyBranch> for EarthlyBranch
impl PartialOrd<EarthlyBranch> for EarthlyBranch
source§fn partial_cmp(&self, other: &EarthlyBranch) -> Option<Ordering>
fn partial_cmp(&self, other: &EarthlyBranch) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more