[][src]Trait dispose::DisposeIterator

pub trait DisposeIterator {
    fn dispose_iter(self);
}

A helper tratif for iterators with items implementing Dispose.

This trait exists mainly because of the stringency of Rust's trait solver — implmenting Dispose for all I: IntoIterator with I::Item: Dispose causes conflicts with the other blanket implementations of Dispose, so this trait serves as a replacement.

Several types with DisposeIterator implementations (such as [Vec<T>]) have dedicated Dispose implementations for convenience.

Required methods

fn dispose_iter(self)

Dispose all items in the iterator, consuming it.

Loading content...

Implementors

impl<I: IntoIterator> DisposeIterator for I where
    I::Item: Dispose
[src]

Loading content...