pub fn iter(&self) -> impl Iterator<Item = &T> {
        let head = self.head_index as usize;
        let first_part = self.items[head..].iter();
        let last_part = self.items[..head].iter();

        first_part.chain(last_part)
    }
/// Returns an iterator over items.
///
/// # Examples
/// ```
/// # use financial_primitives::capvec::CapVec;
/// let mut items = CapVec::<u64>::new(2);
/// items.push(1);
/// items.push(2);
/// items.push(3);
/// let items_vec: Vec<_> = items.iter().copied().collect();
/// assert_eq!(items_vec, vec![2, 3]);
/// ```
Returns an iterator over items.
Returns an iterator over items .
pub fn iter(&self) -> impl Iterator<Item = &T> {
        let head = self.head_index as usize;
        let first_part = self.items[head..].iter();
        let last_part = self.items[..head].iter();
        first_part.chain(last_part)
    }
pub fn iter ( & self ) -> impl Iterator < Item = & T > { let head = self . head_index as usize ; let first_part = self . items [ head .. ] . iter ( ) ; let last_part = self . items [ .. head ] . iter ( ) ; first_part . chain ( last_part ) }
Returns an iterator over items.
Returns an iterator over items .
&self
&self
examples
None
use financial_primitives::capvec::capvec;
None