pub struct Clock { /* private fields */ }Expand description
Implementations§
Source§impl Clock
impl Clock
Sourcepub fn set_hours(&self, hours: f32) -> Result<(), WorldError>
pub fn set_hours(&self, hours: f32) -> Result<(), WorldError>
Sets the time of day to hours, taken modulo 24; every client jumps
to it after the next step. The world moves forward to the next time
the clock shows that hour, as if the hours between had passed.
§Errors
WorldError::Refused for an hour that is not a finite number,
WorldError::WrongThread off the game thread and
WorldError::Missing on a build without the clock.
§Examples
See the module.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Clock
impl RefUnwindSafe for Clock
impl Send for Clock
impl Sync for Clock
impl Unpin for Clock
impl UnsafeUnpin for Clock
impl UnwindSafe for Clock
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