pub trait ListLike<T> {
    // Required methods
    fn append(&mut self, x: T);
    fn insert(&mut self, i: usize, x: T);

    // Provided method
    fn extend(&mut self, iterable: Box<dyn Iterator<Item = T>>) { ... }
}
Expand description

An interface for any data structure that works like a Python List.

Required Methods§

source

fn append(&mut self, x: T)

source

fn insert(&mut self, i: usize, x: T)

Provided Methods§

source

fn extend(&mut self, iterable: Box<dyn Iterator<Item = T>>)

Implementors§

source§

impl<T: Iterator> ListLike<T> for List<T>