2012-08-14 18:54:13 -05:00
|
|
|
#[allow(non_camel_case_types)]
|
|
|
|
type IMPL_T<A> = dvec::DVec<A>;
|
2012-05-09 19:30:31 -05:00
|
|
|
|
2012-07-04 16:53:12 -05:00
|
|
|
/**
|
|
|
|
* Iterates through the current contents.
|
|
|
|
*
|
|
|
|
* Attempts to access this dvec during iteration will fail.
|
|
|
|
*/
|
2012-08-23 12:22:14 -05:00
|
|
|
pure fn EACH<A>(self: IMPL_T<A>, f: fn(A) -> bool) {
|
|
|
|
unsafe { self.swap(|v| { vec::each(v, f); v }) }
|
2012-05-09 19:30:31 -05:00
|
|
|
}
|
|
|
|
|
2012-08-23 12:22:14 -05:00
|
|
|
pure fn SIZE_HINT<A>(self: IMPL_T<A>) -> option<uint> {
|
2012-05-09 19:30:31 -05:00
|
|
|
some(self.len())
|
|
|
|
}
|