pub(crate) struct ChunkTicket {
ticket_type: TicketTypeRef,
ticket_level: ChunkTicketLevel,
ticks_left: i64,
}Expand description
One ticket type and level, with its remaining timeout.
Fields§
§ticket_type: TicketTypeRef§ticket_level: ChunkTicketLevel§ticks_left: i64Implementations§
Source§impl ChunkTicket
impl ChunkTicket
Sourcepub(crate) const fn new(
ticket_type: TicketTypeRef,
ticket_level: ChunkTicketLevel,
) -> Self
pub(crate) const fn new( ticket_type: TicketTypeRef, ticket_level: ChunkTicketLevel, ) -> Self
Creates a ticket with the type’s full timeout.
Sourcepub(crate) const fn from_saved(
ticket_type: TicketTypeRef,
ticket_level: ChunkTicketLevel,
ticks_left: i64,
) -> Self
pub(crate) const fn from_saved( ticket_type: TicketTypeRef, ticket_level: ChunkTicketLevel, ticks_left: i64, ) -> Self
Restores a ticket’s serialized remaining timeout.
Sourcepub(crate) const fn for_full_chunk_radius(
ticket_type: TicketTypeRef,
radius: u8,
) -> Self
pub(crate) const fn for_full_chunk_radius( ticket_type: TicketTypeRef, radius: u8, ) -> Self
Creates a ticket that makes chunks full within radius.
pub(crate) const fn ticket_type(&self) -> TicketTypeRef
pub(crate) const fn ticket_level(&self) -> ChunkTicketLevel
pub(crate) const fn ticks_left(&self) -> i64
Sourcepub(crate) const fn loading_level(&self) -> Option<ChunkTicketLevel>
pub(crate) const fn loading_level(&self) -> Option<ChunkTicketLevel>
Returns this ticket’s contribution to loading propagation.
Sourcepub(crate) const fn simulation_level(&self) -> Option<ChunkTicketLevel>
pub(crate) const fn simulation_level(&self) -> Option<ChunkTicketLevel>
Returns this ticket’s contribution to simulation propagation.
Sourcepub(crate) const fn reset_ticks_left(&mut self)
pub(crate) const fn reset_ticks_left(&mut self)
Restores the type’s full timeout.
Sourcepub(crate) const fn decrease_ticks_left(&mut self)
pub(crate) const fn decrease_ticks_left(&mut self)
Ages a timed ticket by one tick using Java long overflow behavior.
pub(crate) const fn is_timed_out(&self) -> bool
Trait Implementations§
Source§impl Clone for ChunkTicket
impl Clone for ChunkTicket
Source§fn clone(&self) -> ChunkTicket
fn clone(&self) -> ChunkTicket
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 ChunkTicket
Source§impl Debug for ChunkTicket
impl Debug for ChunkTicket
impl Eq for ChunkTicket
Auto Trait Implementations§
impl Freeze for ChunkTicket
impl RefUnwindSafe for ChunkTicket
impl Send for ChunkTicket
impl Sync for ChunkTicket
impl Unpin for ChunkTicket
impl UnsafeUnpin for ChunkTicket
impl UnwindSafe for ChunkTicket
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compares
self with key and returns true if they are equal.§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<>>