pub struct LeafData {
pub point_idx: usize,
pub parent: Option<NodeRef>,
pub mass: u64,
}Expand description
Raw leaf-node record. Lives inline in the crate::NodeStore
leaf arena — one entry per live leaf. Kept small (no bounding
box, no cut) so the leaf arena fits many entries per cache line.
Before the v4 split the leaf arena stored the full Node<D>
enum with its internal-variant shape, wasting ~300 bytes per
leaf at D = 16.
Fields§
§point_idx: usizeIndex into the forest point store.
parent: Option<NodeRef>Parent reference (None only when the tree contains a
single leaf at the root).
mass: u64Number of stored copies of this point. Always >= 1.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LeafData
impl<'de> Deserialize<'de> for LeafData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for LeafData
impl Eq for LeafData
impl StructuralPartialEq for LeafData
Auto Trait Implementations§
impl Freeze for LeafData
impl RefUnwindSafe for LeafData
impl Send for LeafData
impl Sync for LeafData
impl Unpin for LeafData
impl UnsafeUnpin for LeafData
impl UnwindSafe for LeafData
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,
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 more