#[repr(transparent)]
pub struct NtBoxingListHead<E: NtBoxedListElement<L = L> + NtListElement<L>, L: NtTypedList<T = NtList>>(_);
Available on crate feature alloc only.
Expand description

A variant of NtListHead that boxes every element on insertion.

This guarantees ownership and therefore all NtBoxingListHead functions can be used without resorting to unsafe. If you can, use this implementation over NtListHead.

You need to implement the NtBoxedListElement trait to designate a single list as the boxing one. This also establishes clear ownership when a single element is part of more than one list.

See the module-level documentation for more details.

This structure substitutes the LIST_ENTRY structure of the Windows NT API for the list header.

Implementations

Creates a new doubly linked list that owns all elements.

This function substitutes InitializeListHead of the Windows NT API.

Moves all elements from other to the end of the list.

This reuses all the nodes from other and moves them into self. After this operation, other becomes empty.

This operation computes in O(1) time.

Provides a reference to the last element, or None if the list is empty.

This operation computes in O(1) time.

Provides a mutable reference to the last element, or None if the list is empty.

This operation computes in O(1) time.

Removes all elements from the list, deallocating their memory.

Unlike NtListHead::clear, this operation computes in O(n) time, because it needs to traverse all elements to deallocate them.

Provides a reference to the first element, or None if the list is empty.

This operation computes in O(1) time.

Provides a mutable reference to the first element, or None if the list is empty.

This operation computes in O(1) time.

Returns true if the list is empty.

This function substitutes IsListEmpty of the Windows NT API.

This operation computes in O(1) time.

Returns an iterator yielding references to each element of the list.

Returns an iterator yielding mutable references to each element of the list.

Counts all elements and returns the length of the list.

This operation computes in O(n) time.

Removes the last element from the list and returns it, or None if the list is empty.

This function substitutes RemoveTailList of the Windows NT API.

This operation computes in O(1) time.

Removes the first element from the list and returns it, or None if the list is empty.

This function substitutes RemoveHeadList of the Windows NT API.

This operation computes in O(1) time.

Appends an element to the back of the list.

This function substitutes InsertTailList of the Windows NT API.

This operation computes in O(1) time.

Appends an element to the front of the list.

This function substitutes InsertHeadList of the Windows NT API.

This operation computes in O(1) time.

Retains only the elements specified by the predicate, passing a mutable reference to it.

In other words, remove all elements e for which f(&mut e) returns false. This method operates in place, visiting each element exactly once in the original order, and preserves the order of the retained elements.

This function substitutes RemoveEntryList of the Windows NT API.

This operation computes in O(n) time.

Trait Implementations

Executes the destructor for this type. Read more
Extends a collection with the contents of an iterator. Read more
🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Extends a collection with the contents of an iterator. Read more
🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.