pub unsafe trait SListItem<Tag>: Sized {
// Required method
fn get_node(&self) -> &mut SListNode<Self, Tag>;
}Expand description
A trait to return internal mutable SListNode for specified list.
The tag is used to distinguish different SListNodes within the same item.
For only one ownership, you can use ().
§Safety
Implementors must ensure get_node returns a valid reference to the SListNode
embedded within Self. Users must use UnsafeCell to hold SListNode to support
interior mutability required by list operations.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".