// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. mod inst { use dvec; use option::{Option, Some}; #[allow(non_camel_case_types)] pub type IMPL_T = dvec::DVec; /** * Iterates through the current contents. * * Attempts to access this dvec during iteration will fail. */ #[inline(always)] pub pure fn EACH(self: &IMPL_T, f: fn(v: &A) -> bool) { unsafe { do self.swap |v| { v.each(f); v } } } #[inline(always)] pub pure fn SIZE_HINT(self: &IMPL_T) -> Option { Some(self.len()) } }