pub struct NodeHierarchy {
pub internal: Vec<Node>,
}Expand description
The hierarchy of nodes is stored separately from the actual node content in order to save on memory, since the hierarchy can be re-used across several DOM trees even if the content changes.
Fields§
§internal: Vec<Node>Implementations§
Source§impl NodeHierarchy
impl NodeHierarchy
pub const fn new(data: Vec<Node>) -> Self
pub fn as_ref<'a>(&'a self) -> NodeHierarchyRef<'a>
pub fn as_ref_mut<'a>(&'a mut self) -> NodeHierarchyRefMut<'a>
Trait Implementations§
Source§impl Clone for NodeHierarchy
impl Clone for NodeHierarchy
Source§fn clone(&self) -> NodeHierarchy
fn clone(&self) -> NodeHierarchy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NodeHierarchy
impl Debug for NodeHierarchy
Source§impl Default for NodeHierarchy
impl Default for NodeHierarchy
Source§fn default() -> NodeHierarchy
fn default() -> NodeHierarchy
Returns the “default value” for a type. Read more
Source§impl Hash for NodeHierarchy
impl Hash for NodeHierarchy
Source§impl Ord for NodeHierarchy
impl Ord for NodeHierarchy
Source§fn cmp(&self, other: &NodeHierarchy) -> Ordering
fn cmp(&self, other: &NodeHierarchy) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for NodeHierarchy
impl PartialEq for NodeHierarchy
Source§impl PartialOrd for NodeHierarchy
impl PartialOrd for NodeHierarchy
impl Eq for NodeHierarchy
impl StructuralPartialEq for NodeHierarchy
Auto Trait Implementations§
impl Freeze for NodeHierarchy
impl RefUnwindSafe for NodeHierarchy
impl Send for NodeHierarchy
impl Sync for NodeHierarchy
impl Unpin for NodeHierarchy
impl UnwindSafe for NodeHierarchy
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