Crate rusty_list

Crate rusty_list 

Source

Structs§

RustyList
A doubly linked intrusive list. T is the type that contains a RustyListNode<T> inside it.
RustyListNode
A node that gets embedded inside a struct to make it linkable in a RustyList.

Traits§

HasRustyNode
Trait that must be implemented by any struct that embeds a RustyListNode<T>. Provides the offset to the node so that the list can navigate from a node to the parent struct.

Functions§

rusty_container_of
SAFELY go from a pointer to the embedded node to a pointer to the container T. This is like container_of() in C.
rusty_container_of_mut
Mutable version of rusty_container_of.
rusty_offset
Generic offsetof-style function. Gets the offset of a field inside a struct at compile time. Similar to offsetof(T, field) in C.