View playground.rs
trait StreamingIterator<'a> { | |
type Item; | |
fn next(&'a mut self) -> Option<Self::Item>; | |
} | |
struct Buffer<T> { | |
data: Vec<T>, | |
pos: usize | |
} |
View playground.rs
use std::collections::VecDeque; | |
// The kind * -> * | |
trait TypeToType<Input> { | |
type Output; | |
} | |
struct Vec_; | |
struct VecDeque_; |
View gist:06b4c5454bd4f3ef732a
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 { |