Struct LifecycleContext
#[non_exhaustive]pub struct LifecycleContext {
pub authority: Authority,
pub epoch: WorldEpoch,
pub tick: TickId,
}Expand description
Context for every world lifecycle phase.
authority is the server role. LocalAuthoritative and RemoteClient never
fire today. epoch identifies the open attempt, including failed opens;
the same epoch identifies its ready, final-close, or failed-close event.
tick counts non-paused server ticks since the world opened.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.The server role that fired the phase.
epoch: WorldEpochIdentifies the open attempt this phase belongs to.
tick: TickIdNon-paused server ticks since the world opened.
Trait Implementations§
§impl Clone for LifecycleContext
impl Clone for LifecycleContext
§fn clone(&self) -> LifecycleContext
fn clone(&self) -> LifecycleContext
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 LifecycleContext
§impl Debug for LifecycleContext
impl Debug for LifecycleContext
impl Eq for LifecycleContext
§impl From<LifecycleContext> for LifecycleContext
impl From<LifecycleContext> for LifecycleContext
§fn from(v: LifecycleContext) -> LifecycleContext
fn from(v: LifecycleContext) -> LifecycleContext
Converts to this type from the input type.
§impl PartialEq for LifecycleContext
impl PartialEq for LifecycleContext
impl StructuralPartialEq for LifecycleContext
Auto Trait Implementations§
impl Freeze for LifecycleContext
impl RefUnwindSafe for LifecycleContext
impl Send for LifecycleContext
impl Sync for LifecycleContext
impl Unpin for LifecycleContext
impl UnsafeUnpin for LifecycleContext
impl UnwindSafe for LifecycleContext
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