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
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.