pub(crate) struct JavaBlockPosSet {
buckets: Vec<Bucket>,
entries: Vec<Entry>,
trees: FxHashMap<u32, Links>,
len: usize,
equal_hash_order: EqualHashOrder,
}Expand description
Java bucket ordering with a deterministic policy for equal-hash tree entries.
Fields§
§buckets: Vec<Bucket>§entries: Vec<Entry>§trees: FxHashMap<u32, Links>§len: usize§equal_hash_order: EqualHashOrderImplementations§
Source§impl JavaBlockPosSet
impl JavaBlockPosSet
pub(super) fn tree_root(&self, node: u32) -> u32
pub(super) fn links(&self, node: u32) -> &Links
pub(super) fn links_mut(&mut self, node: u32) -> &mut Links
fn reset_links(&mut self, node: u32)
pub(super) fn find_in_tree(&self, node: u32, hash: i32, pos: BlockPos) -> bool
fn goes_left(&self, node: u32, parent: u32) -> bool
fn attach(&mut self, root: u32, node: u32) -> u32
pub(super) fn split_tree(&mut self, index: usize, head: u32, bit: usize)
pub(super) fn treeify(&mut self, bucket: usize)
pub(super) fn insert_tree(&mut self, bucket: usize, node: u32)
fn move_root_to_front(&mut self, bucket: usize, root: u32)
pub(super) fn rotate(&mut self, root: u32, node: u32, left: bool) -> u32
fn balance_insertion(&mut self, root: u32, node: u32) -> u32
Source§impl JavaBlockPosSet
impl JavaBlockPosSet
pub(crate) fn new(equal_hash_order: EqualHashOrder) -> Self
pub(crate) fn insert(&mut self, pos: BlockPos) -> bool
pub(crate) fn contains(&self, pos: BlockPos) -> bool
pub(crate) const fn is_empty(&self) -> bool
pub(crate) fn java_order(&self) -> impl Iterator<Item = &BlockPos>
pub(crate) fn java_ordered_positions(&self) -> Vec<BlockPos>
pub(crate) fn pop_java_ordered_position(&mut self) -> Option<BlockPos>
fn append(&mut self, bucket_index: usize, entry_index: u32)
fn resize(&mut self)
Trait Implementations§
Source§impl Default for JavaBlockPosSet
impl Default for JavaBlockPosSet
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<>>