pub struct WorldClock {
pub day: u64,
pub hour: u8,
pub minute: u8,
pub phase: TimeOfDayPhase,
}Expand description
Authoritative region clock (one in-game day = configurable real duration).
Fields§
§day: u64Days elapsed since region start (0-based).
hour: u8§minute: u8§phase: TimeOfDayPhaseImplementations§
Source§impl WorldClock
impl WorldClock
pub fn display_time(self) -> String
Trait Implementations§
Source§impl Clone for WorldClock
impl Clone for WorldClock
Source§fn clone(&self) -> WorldClock
fn clone(&self) -> WorldClock
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 WorldClock
Source§impl Debug for WorldClock
impl Debug for WorldClock
Source§impl Default for WorldClock
impl Default for WorldClock
Source§impl<'de> Deserialize<'de> for WorldClock
impl<'de> Deserialize<'de> for WorldClock
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
Source§impl PartialEq for WorldClock
impl PartialEq for WorldClock
Source§impl Serialize for WorldClock
impl Serialize for WorldClock
impl StructuralPartialEq for WorldClock
Auto Trait Implementations§
impl Freeze for WorldClock
impl RefUnwindSafe for WorldClock
impl Send for WorldClock
impl Sync for WorldClock
impl Unpin for WorldClock
impl UnsafeUnpin for WorldClock
impl UnwindSafe for WorldClock
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