Struct skiplist_rs::List [−][src]
pub struct List<T, V> where
T: Display, {
pub header: Option<NonNull<Node<T, V>>>,
pub tailer: Option<NonNull<Node<T, V>>>,
pub len: usize,
}
Fields
header: Option<NonNull<Node<T, V>>>
tailer: Option<NonNull<Node<T, V>>>
len: usize
记录链表中的节点数量,可以查看跳跃表每层的节点数量是否分布均匀
Implementations
pub fn insert_with_position(
&mut self,
score: T,
data: Option<V>,
insert_position: Option<InsertPosition<T, V>>
) -> NonNull<Node<T, V>>
寻找该层最适合插入的位置 除非链表是空的,否则不会返回空值