pub trait AbsoluteLinkedList<T: LinkType>: LinkedList<T> {
// Required methods
fn get_first(&self) -> T;
fn get_last(&self) -> T;
fn get_size(&self) -> T;
fn set_first(&mut self, element: T);
fn set_last(&mut self, element: T);
fn set_size(&mut self, size: T);
// Provided methods
fn inc_size(&mut self) { ... }
fn dec_size(&mut self) { ... }
}Expand description
Linked list with direct (absolute) access to the first and last elements and a size counter.
This is typically used when a single list instance owns its own
head/tail/size metadata. For multiple lists sharing the same
storage, see RelativeLinkedList.