Trait nt_list::NtBoxedListElement
source · pub trait NtBoxedListElement {
type L: NtTypedList;
}
Expand description
Enables NtBoxingListHead
for a list element structure.
While an element may be part of multiple lists, only one list may have ownership of the element
and handle its memory allocation and deallocation.
Therefore, NtBoxedListElement
can only be implemented once per list element structure.
The easiest way to implement this trait is to use the #[boxed]
attribute for the appropriate
entry field and use derive
on the structure:
#[derive(NtListElement)]
#[repr(C)]
struct MyElement {
#[boxed]
entry: NtListEntry<Self, MyList>,
value: i32,
}
Required Associated Types§
sourcetype L: NtTypedList
type L: NtTypedList
Identifier of the list