Struct bao_tree::iter::NodeInfo

source ·
pub struct NodeInfo<'a> {
    pub node: TreeNode,
    pub l_ranges: &'a RangeSetRef<ChunkNum>,
    pub r_ranges: &'a RangeSetRef<ChunkNum>,
    pub full: bool,
    pub query_leaf: bool,
    pub is_root: bool,
    pub is_half_leaf: bool,
}
Expand description

Extended node info.

Some of the information is redundant, but it is convenient to have it all in one place.

Fields§

§node: TreeNode

the node

§l_ranges: &'a RangeSetRef<ChunkNum>

left child intersection with the query range

§r_ranges: &'a RangeSetRef<ChunkNum>

right child intersection with the query range

§full: bool

the node is fully included in the query range

§query_leaf: bool

the node is a leaf for the purpose of this query

§is_root: bool

the node is the root node (needs special handling when computing hash)

§is_half_leaf: bool

true if this node is the last leaf, and it is <= half full

Trait Implementations§

source§

impl<'a> Debug for NodeInfo<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> PartialEq<NodeInfo<'a>> for NodeInfo<'a>

source§

fn eq(&self, other: &NodeInfo<'a>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'a> Eq for NodeInfo<'a>

source§

impl<'a> StructuralEq for NodeInfo<'a>

source§

impl<'a> StructuralPartialEq for NodeInfo<'a>

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for NodeInfo<'a>

§

impl<'a> Send for NodeInfo<'a>

§

impl<'a> Sync for NodeInfo<'a>

§

impl<'a> Unpin for NodeInfo<'a>

§

impl<'a> UnwindSafe for NodeInfo<'a>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.