struct TreeOrderedIndexMapEntry {
element: MutNullableDom<Element>,
elements: Vec<Dom<Element>>,
count: usize,
}Expand description
An entry in the TreeOrderedIndexMap.
This entry has two states: resolved and unresolved. When an entry in the map refers to a
single element, it is resolved. When any additional entries are added or removed, the entry
becomes unresolved. At that point, in order to know what element an id or name
attribute refer to, the TreeOrderedIndexMap walks the DOM and fills out the elements
and element field of the entry.
Fields§
§element: MutNullableDom<Element>The first element in the tree that has this key. If this is null, then it means the list needs to be regenerated after a modification of the map.
elements: Vec<Dom<Element>>An ordered list of Elements that have this key. When this is empty,
it means the list needs to be regenerated after a modification of the map.
count: usizeThe number of Elements that have this key. This is used in order to
do an early return during generation of Self::elements.
Implementations§
Source§impl TreeOrderedIndexMapEntry
impl TreeOrderedIndexMapEntry
fn new(element: &Element) -> Self
fn add(&mut self)
fn remove(&mut self) -> bool
Sourcefn needs_resolution(&self) -> bool
fn needs_resolution(&self) -> bool
Returns true if this entry needs to be resolved. An entry will need to be
resolved if it ever gains more than one element associated with it or has
more than one element associated and Self::remove() is called.
Trait Implementations§
Source§impl MallocSizeOf for TreeOrderedIndexMapEntry
impl MallocSizeOf for TreeOrderedIndexMapEntry
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Auto Trait Implementations§
impl !Freeze for TreeOrderedIndexMapEntry
impl !RefUnwindSafe for TreeOrderedIndexMapEntry
impl !Send for TreeOrderedIndexMapEntry
impl !Sync for TreeOrderedIndexMapEntry
impl Unpin for TreeOrderedIndexMapEntry
impl UnsafeUnpin for TreeOrderedIndexMapEntry
impl !UnwindSafe for TreeOrderedIndexMapEntry
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
Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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