2012-08-14 18:54:13 -05:00
|
|
|
#[allow(non_camel_case_types)]
|
2012-10-01 19:25:21 -05:00
|
|
|
pub 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-10-01 19:25:21 -05:00
|
|
|
pub pure fn EACH<A>(self: &IMPL_T<A>, f: fn(v: &A) -> bool) {
|
2012-09-18 23:41:37 -05:00
|
|
|
unsafe {
|
|
|
|
do self.swap |v| {
|
|
|
|
v.each(f);
|
|
|
|
move v
|
|
|
|
}
|
|
|
|
}
|
2012-05-09 19:30:31 -05:00
|
|
|
}
|
|
|
|
|
2012-10-01 19:25:21 -05:00
|
|
|
pub pure fn SIZE_HINT<A>(self: &IMPL_T<A>) -> Option<uint> {
|
2012-08-20 14:23:37 -05:00
|
|
|
Some(self.len())
|
2012-05-09 19:30:31 -05:00
|
|
|
}
|