This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait StreamingIterator<'a> { | |
type Item; | |
fn next(&'a mut self) -> Option<Self::Item>; | |
} | |
struct Buffer<T> { | |
data: Vec<T>, | |
pos: usize | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::collections::VecDeque; | |
// The kind * -> * | |
trait TypeToType<Input> { | |
type Output; | |
} | |
struct Vec_; | |
struct VecDeque_; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub trait Collection { | |
fn len(self) -> uint; | |
fn is_empty(&self) -> bool; //defaulted | |
} | |
pub trait Mutable: Collection { | |
fn clear(&mut self); | |
} | |
pub trait Container<T>: Collection { |