pub(super) struct PlayerLifecycleState {
joined_world: bool,
pending_client_loaded: bool,
client_loaded_timeout: i32,
domain_switch: Option<DomainSwitchState>,
respawn: Option<PendingWorldChangeToken>,
deferred_death_respawn: bool,
}Expand description
Client lifecycle flags that gate gameplay packet handling.
Fields§
§joined_world: bool§pending_client_loaded: bool§client_loaded_timeout: i32§domain_switch: Option<DomainSwitchState>§respawn: Option<PendingWorldChangeToken>§deferred_death_respawn: boolImplementations§
Source§impl PlayerLifecycleState
impl PlayerLifecycleState
pub(super) const fn client_loaded(self) -> bool
pub(super) const fn joined_world(self) -> bool
pub(super) const fn set_joined_world(&mut self, joined_world: bool)
pub(super) const fn set_client_loaded(&mut self, client_loaded: bool)
pub(super) const fn mark_client_loaded_from_network(&mut self) -> bool
pub(super) const fn apply_pending_client_loaded(&mut self) -> bool
pub(super) const fn tick_client_load_timeout(&mut self)
pub(super) const fn domain_switching(self) -> bool
pub(super) const fn domain_switch_blocks_gameplay(self) -> bool
pub(super) const fn gate_domain_switch_packet( &mut self, handshake_packet: bool, defer_death_respawn: bool, ) -> bool
pub(super) const fn begin_domain_switch( &mut self, token: PendingWorldChangeToken, ) -> bool
pub(super) fn domain_switch_queued(self, token: PendingWorldChangeToken) -> bool
pub(super) fn domain_switch_detached( self, token: PendingWorldChangeToken, ) -> bool
pub(super) fn mark_domain_switch_detached( &mut self, token: PendingWorldChangeToken, ) -> bool
pub(super) fn mark_domain_switch_target_handshake( &mut self, token: PendingWorldChangeToken, ) -> bool
pub(super) fn mark_domain_switch_live( &mut self, token: PendingWorldChangeToken, ) -> bool
pub(super) fn finish_domain_switch( &mut self, token: PendingWorldChangeToken, ) -> bool
pub(super) const fn begin_respawn( &mut self, token: PendingWorldChangeToken, ) -> bool
pub(super) const fn defer_death_respawn(&mut self)
pub(super) const fn take_deferred_death_respawn(&mut self) -> bool
pub(super) fn respawn_pending(self, token: PendingWorldChangeToken) -> bool
pub(super) fn finish_respawn(&mut self, token: PendingWorldChangeToken) -> bool
pub(super) fn finish_transition( &mut self, token: PendingWorldChangeToken, ) -> bool
Trait Implementations§
Source§impl Clone for PlayerLifecycleState
impl Clone for PlayerLifecycleState
Source§fn clone(&self) -> PlayerLifecycleState
fn clone(&self) -> PlayerLifecycleState
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 PlayerLifecycleState
Source§impl Debug for PlayerLifecycleState
impl Debug for PlayerLifecycleState
Auto Trait Implementations§
impl Freeze for PlayerLifecycleState
impl RefUnwindSafe for PlayerLifecycleState
impl Send for PlayerLifecycleState
impl Sync for PlayerLifecycleState
impl Unpin for PlayerLifecycleState
impl UnsafeUnpin for PlayerLifecycleState
impl UnwindSafe for PlayerLifecycleState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>