pub(super) struct JavaBlockPosSet {
entries: Vec<BlockPos>,
present: FxHashSet<BlockPos>,
}Expand description
Block-position set for feature code that vanilla models as HashSet<BlockPos>.
Java HashSet iteration order is implementation-defined, so the extractor normalizes these
worldgen sets to insertion order. Steel follows that deterministic oracle instead of depending
on JVM bucket ordering.
Fields§
§entries: Vec<BlockPos>§present: FxHashSet<BlockPos>Implementations§
Source§impl JavaBlockPosSet
impl JavaBlockPosSet
pub(super) fn insert(&mut self, pos: BlockPos) -> bool
pub(super) fn remove(&mut self, pos: BlockPos) -> bool
pub(super) fn contains(&self, pos: BlockPos) -> bool
pub(super) fn is_empty(&self) -> bool
pub(super) fn insertion_order(&self) -> impl Iterator<Item = &BlockPos>
pub(super) fn java_ordered_positions(&self) -> Vec<BlockPos>
pub(super) fn pop_java_ordered_position(&mut self) -> Option<BlockPos>
Trait Implementations§
Source§impl Default for JavaBlockPosSet
impl Default for JavaBlockPosSet
Source§fn default() -> JavaBlockPosSet
fn default() -> JavaBlockPosSet
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for JavaBlockPosSet
impl RefUnwindSafe for JavaBlockPosSet
impl Send for JavaBlockPosSet
impl Sync for JavaBlockPosSet
impl Unpin for JavaBlockPosSet
impl UnsafeUnpin for JavaBlockPosSet
impl UnwindSafe for JavaBlockPosSet
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<>>