pub enum TimeOfDayPhase {
Night,
Dawn,
Morning,
Midday,
Afternoon,
Evening,
}Expand description
Named slice of the in-game day (drives future weather / spawn tables).
Variants§
Implementations§
Source§impl TimeOfDayPhase
impl TimeOfDayPhase
Sourcepub const ALL: [Self; 6]
pub const ALL: [Self; 6]
Authorable snake_case ids, in clock order. Keep in sync with content-admin
WORLD_CLOCK_PHASES and schemas/npc-definition.schema.json.
pub fn label(self) -> &'static str
pub fn snake_name(self) -> &'static str
pub fn try_from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Self
Trait Implementations§
Source§impl Clone for TimeOfDayPhase
impl Clone for TimeOfDayPhase
Source§fn clone(&self) -> TimeOfDayPhase
fn clone(&self) -> TimeOfDayPhase
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 moreimpl Copy for TimeOfDayPhase
Source§impl Debug for TimeOfDayPhase
impl Debug for TimeOfDayPhase
Source§impl<'de> Deserialize<'de> for TimeOfDayPhase
impl<'de> Deserialize<'de> for TimeOfDayPhase
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TimeOfDayPhase
Source§impl PartialEq for TimeOfDayPhase
impl PartialEq for TimeOfDayPhase
Source§impl Serialize for TimeOfDayPhase
impl Serialize for TimeOfDayPhase
impl StructuralPartialEq for TimeOfDayPhase
Auto Trait Implementations§
impl Freeze for TimeOfDayPhase
impl RefUnwindSafe for TimeOfDayPhase
impl Send for TimeOfDayPhase
impl Sync for TimeOfDayPhase
impl Unpin for TimeOfDayPhase
impl UnsafeUnpin for TimeOfDayPhase
impl UnwindSafe for TimeOfDayPhase
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