pub struct NodeId {
pub level: usize,
pub position: usize,
}Expand description
Node identifier in the WPT tree
Fields§
§level: usize§position: usizeImplementations§
Source§impl NodeId
impl NodeId
Sourcepub fn left_child(&self) -> NodeId
pub fn left_child(&self) -> NodeId
Get the left child node ID
Sourcepub fn right_child(&self) -> NodeId
pub fn right_child(&self) -> NodeId
Get the right child node ID
Sourcepub fn is_left_child(&self) -> bool
pub fn is_left_child(&self) -> bool
Check if this node is a left child
Sourcepub fn is_right_child(&self) -> bool
pub fn is_right_child(&self) -> bool
Check if this node is a right child
Trait Implementations§
impl Copy for NodeId
impl Eq for NodeId
impl StructuralPartialEq for NodeId
Auto Trait Implementations§
impl Freeze for NodeId
impl RefUnwindSafe for NodeId
impl Send for NodeId
impl Sync for NodeId
impl Unpin for NodeId
impl UnwindSafe for NodeId
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