2012-05-09 19:30:31 -05:00
|
|
|
type IMPL_T<A> = dvec::dvec<A>;
|
|
|
|
|
2012-07-04 16:53:12 -05:00
|
|
|
/**
|
|
|
|
* Iterates through the current contents.
|
|
|
|
*
|
|
|
|
* Attempts to access this dvec during iteration will fail.
|
|
|
|
*/
|
2012-05-09 19:30:31 -05:00
|
|
|
fn EACH<A>(self: IMPL_T<A>, f: fn(A) -> bool) {
|
2012-06-30 18:19:07 -05:00
|
|
|
self.swap(|v| { vec::each(v, f); v })
|
2012-05-09 19:30:31 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn SIZE_HINT<A>(self: IMPL_T<A>) -> option<uint> {
|
|
|
|
some(self.len())
|
|
|
|
}
|