pub struct LightPropagationQueue {
entries: Vec<QueuedLightUpdate>,
read_index: usize,
}Expand description
Array-backed FIFO used for vanilla light propagation work.
Vanilla stores alternating packed block positions and QueueEntry longs in
LongArrayFIFOQueue. Steel keeps typed records instead, while preserving
the FIFO ordering and packed queue-entry semantics that propagation depends
on.
Fields§
§entries: Vec<QueuedLightUpdate>§read_index: usizeImplementations§
Source§impl LightPropagationQueue
impl LightPropagationQueue
Sourcepub const fn len(&self) -> usize
pub const fn len(&self) -> usize
Returns the number of queued items that have not been dequeued yet.
Sourcepub fn enqueue(&mut self, block_pos: BlockPos, entry: LightQueueEntry)
pub fn enqueue(&mut self, block_pos: BlockPos, entry: LightQueueEntry)
Adds propagation work to the back of the queue.
Sourcepub fn dequeue(&mut self) -> Option<QueuedLightUpdate>
pub fn dequeue(&mut self) -> Option<QueuedLightUpdate>
Removes propagation work from the front of the queue.
Trait Implementations§
Source§impl Debug for LightPropagationQueue
impl Debug for LightPropagationQueue
Auto Trait Implementations§
impl Freeze for LightPropagationQueue
impl RefUnwindSafe for LightPropagationQueue
impl Send for LightPropagationQueue
impl Sync for LightPropagationQueue
impl Unpin for LightPropagationQueue
impl UnsafeUnpin for LightPropagationQueue
impl UnwindSafe for LightPropagationQueue
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
§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<>>