Trait kernel::list::HasListLinks
source · pub unsafe trait HasListLinks<const ID: u64 = 0> {
// Required method
unsafe fn raw_get_list_links(ptr: *mut Self) -> *mut ListLinks<ID>;
}
Expand description
Declares that this type has a ListLinks<ID>
field.
This trait is only used to help implement ListItem
safely. If ListItem
is implemented
manually, then this trait is not needed. Use the impl_has_list_links!
macro to implement
this trait.
§Safety
The methods on this trait must have exactly the behavior that the definitions given below have.
Required Methods§
sourceunsafe fn raw_get_list_links(ptr: *mut Self) -> *mut ListLinks<ID>
unsafe fn raw_get_list_links(ptr: *mut Self) -> *mut ListLinks<ID>
Returns a pointer to the ListLinks<ID>
field.
§Safety
The provided pointer must point at a valid struct of type Self
.
Object Safety§
This trait is not object safe.