pub struct TableOverrides { /* private fields */ }Expand description
自定义四化与亮度表。
紫微斗数流派众多,四化与星耀亮度是分歧最集中的两处。这里按 key 整表替换 默认值:给出某个天干的四化就只改那个天干,未给出的天干仍用默认表;亮度同理。
Implementations§
Source§impl TableOverrides
impl TableOverrides
Sourcepub fn set_mutagens(&mut self, stem: HeavenlyStem, stars: [StarKey; 4])
pub fn set_mutagens(&mut self, stem: HeavenlyStem, stars: [StarKey; 4])
覆盖某个天干的四化表。
Sourcepub fn set_brightness(&mut self, star: StarKey, table: [Option<Brightness>; 12])
pub fn set_brightness(&mut self, star: StarKey, table: [Option<Brightness>; 12])
覆盖某颗星的十二宫亮度表。
Sourcepub fn mutagens_of(&self, stem: HeavenlyStem) -> Option<&[StarKey; 4]>
pub fn mutagens_of(&self, stem: HeavenlyStem) -> Option<&[StarKey; 4]>
取该天干被覆盖的四化表;未覆盖时返回 None。
Sourcepub fn brightness_of(&self, star: StarKey) -> Option<&[Option<Brightness>; 12]>
pub fn brightness_of(&self, star: StarKey) -> Option<&[Option<Brightness>; 12]>
取该星被覆盖的亮度表;未覆盖时返回 None。
Trait Implementations§
Source§impl Clone for TableOverrides
impl Clone for TableOverrides
Source§fn clone(&self) -> TableOverrides
fn clone(&self) -> TableOverrides
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TableOverrides
impl Debug for TableOverrides
Source§impl Default for TableOverrides
impl Default for TableOverrides
Source§fn default() -> TableOverrides
fn default() -> TableOverrides
Returns the “default value” for a type. Read more
impl Eq for TableOverrides
Source§impl PartialEq for TableOverrides
impl PartialEq for TableOverrides
impl StructuralPartialEq for TableOverrides
Auto Trait Implementations§
impl Freeze for TableOverrides
impl RefUnwindSafe for TableOverrides
impl Send for TableOverrides
impl Sync for TableOverrides
impl Unpin for TableOverrides
impl UnsafeUnpin for TableOverrides
impl UnwindSafe for TableOverrides
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