pub struct StructureReferenceSet {
insertion_order: Vec<ChunkPos>,
iteration_order: Vec<ChunkPos>,
}Expand description
Set of structure-start chunk positions with vanilla iteration order.
Reference generation discovers sources in a stable scan order, but vanilla
stores the packed chunk longs in fastutil’s LongOpenHashSet. Feature-stage
placement consumes the set through that table iteration order, so Steel keeps
the insertion order for persistence and exposes the vanilla iteration order
for worldgen.
Fields§
§insertion_order: Vec<ChunkPos>§iteration_order: Vec<ChunkPos>Implementations§
Source§impl StructureReferenceSet
impl StructureReferenceSet
Sourcepub fn insert(&mut self, pos: ChunkPos) -> bool
pub fn insert(&mut self, pos: ChunkPos) -> bool
Inserts a chunk position if it was not already present.
Sourcepub fn extend(&mut self, positions: impl IntoIterator<Item = ChunkPos>)
pub fn extend(&mut self, positions: impl IntoIterator<Item = ChunkPos>)
Extends this set with insertion-order duplicate removal.
Sourcepub fn iter(&self) -> Iter<'_, ChunkPos> ⓘ
pub fn iter(&self) -> Iter<'_, ChunkPos> ⓘ
Returns an iterator over positions in vanilla LongOpenHashSet order.
Sourcepub fn insertion_order_iter(&self) -> Iter<'_, ChunkPos> ⓘ
pub fn insertion_order_iter(&self) -> Iter<'_, ChunkPos> ⓘ
Returns an iterator over positions in discovery order.
fn rebuild_iteration_order(&mut self)
fn vanilla_long_open_hash_set_order( insertion_order: &[ChunkPos], ) -> Vec<ChunkPos>
fn vanilla_long_open_hash_set_table_size(len: usize) -> Option<usize>
fn fastutil_array_size(expected: usize) -> usize
const fn fastutil_max_fill(table_size: usize) -> usize
const fn pack_chunk_pos(pos: ChunkPos) -> u64
const fn fastutil_mix(value: u64) -> u64
Trait Implementations§
Source§impl Clone for StructureReferenceSet
impl Clone for StructureReferenceSet
Source§fn clone(&self) -> StructureReferenceSet
fn clone(&self) -> StructureReferenceSet
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 moreSource§impl Debug for StructureReferenceSet
impl Debug for StructureReferenceSet
Source§impl Default for StructureReferenceSet
impl Default for StructureReferenceSet
Source§fn default() -> StructureReferenceSet
fn default() -> StructureReferenceSet
Returns the “default value” for a type. Read more
impl Eq for StructureReferenceSet
Source§impl FromIterator<ChunkPos> for StructureReferenceSet
impl FromIterator<ChunkPos> for StructureReferenceSet
Source§fn from_iter<T: IntoIterator<Item = ChunkPos>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = ChunkPos>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl<'a> IntoIterator for &'a StructureReferenceSet
impl<'a> IntoIterator for &'a StructureReferenceSet
Source§impl IntoIterator for StructureReferenceSet
impl IntoIterator for StructureReferenceSet
Source§impl PartialEq for StructureReferenceSet
impl PartialEq for StructureReferenceSet
impl StructuralPartialEq for StructureReferenceSet
Auto Trait Implementations§
impl Freeze for StructureReferenceSet
impl RefUnwindSafe for StructureReferenceSet
impl Send for StructureReferenceSet
impl Sync for StructureReferenceSet
impl Unpin for StructureReferenceSet
impl UnsafeUnpin for StructureReferenceSet
impl UnwindSafe for StructureReferenceSet
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<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<>>