higher-kinded types

最经典的例子:
trait StreamingIterator {
type Item<'a>;
fn next<'a>(&'a mut self) -> Option<Self::Item<'a>>;
}

登录后可查看完整内容,参与讨论!

立即登录