[][src]Enum esbat::PrincipalPhase

pub enum PrincipalPhase {
    NewMoon,
    FirstQuarter,
    FullMoon,
    LastQuarter,
}

The four principal phases of the Moon.

Variants

NewMoon

🌑 The Moon appears completely dark.

FirstQuarter

🌓 The Moon is half visible after the new moon and before the full moon.

FullMoon

🌕 The Moon is fully visible.

LastQuarter

🌗 The Moon is half visible after the full moon and before the new moon.

Methods

impl PrincipalPhase[src]

pub fn as_emoji(self) -> char[src]

Returns the Unicode emoji representation of the moon phase.

assert_eq!(PrincipalPhase::FullMoon.as_emoji(), '🌕');

pub fn iter() -> Iter<'static, PrincipalPhase>[src]

Views the four principal moon phases as an iterator.

assert_eq!(PrincipalPhase::iter().next(), Some(&PrincipalPhase::NewMoon));
assert_eq!(PrincipalPhase::iter().len(), 4);

Trait Implementations

impl Clone for PrincipalPhase[src]

impl Copy for PrincipalPhase[src]

impl Debug for PrincipalPhase[src]

impl Eq for PrincipalPhase[src]

impl From<PrincipalPhase> for Phase[src]

impl Hash for PrincipalPhase[src]

impl PartialEq<PrincipalPhase> for PrincipalPhase[src]

impl StructuralEq for PrincipalPhase[src]

impl StructuralPartialEq for PrincipalPhase[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.