Module first

Module first 

Source
Expand description

§简单链表

use rt_lists::third::List;

§方法

  • List::new()
  • List::push()
  • List::pop()
  • List::peek()
  • List::peek_mut()

§迭代器

  • into_iter()
  • iter()
  • iter_mut()

§example

use rt_lists::third::List;
let mut list = List::new();
list.push(1);
list.push(2);
assert_eq!(list.pop(), Some(2));

Structs§

List