pub struct NodePath(/* private fields */);
Expand description
A path to a node in the pixel map.
Implementations§
Source§impl NodePath
impl NodePath
pub const MASK: u64 = 16_777_215u64
pub const DEPTH: u64 = 48u64
pub const ROOT: NodePath
pub fn from_quadrants(quadrants: &[Quadrant]) -> NodePath
pub fn is_root(&self) -> bool
pub fn encode(depth: u16, path: u64) -> NodePath
pub fn depth(&self) -> u16
pub fn path_bits(&self) -> u64
pub fn components(&self) -> (u16, u64)
pub fn quadrant_at(&self, index: u16) -> Option<Quadrant>
pub fn tail(&self) -> Option<Quadrant>
pub fn append(&self, quadrant: Quadrant) -> NodePath
pub fn parent(&self) -> NodePath
pub fn truncate(&self, count: u16) -> NodePath
pub fn common_ancestor(&self, b: NodePath) -> NodePath
Trait Implementations§
Source§impl Ord for NodePath
impl Ord for NodePath
Source§impl PartialOrd for NodePath
impl PartialOrd for NodePath
impl Copy for NodePath
impl Eq for NodePath
impl StructuralPartialEq for NodePath
Auto Trait Implementations§
impl Freeze for NodePath
impl RefUnwindSafe for NodePath
impl Send for NodePath
impl Sync for NodePath
impl Unpin for NodePath
impl UnwindSafe for NodePath
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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