pub struct ZigZagIterator { /* private fields */ }Expand description
Zigzag Iterator
Interleave elements from two lists in a zigzag fashion. Elements are yielded alternately from each list until both are exhausted.
§Examples
Basic usage:
let mut it = algorithmz::queue::ZigZagIterator::new(vec![1,2],vec![3,4,5]);
while it.has_next() {
println!("{}",it.next().unwrap());
}Implementations§
Auto Trait Implementations§
impl Freeze for ZigZagIterator
impl RefUnwindSafe for ZigZagIterator
impl Send for ZigZagIterator
impl Sync for ZigZagIterator
impl Unpin for ZigZagIterator
impl UnsafeUnpin for ZigZagIterator
impl UnwindSafe for ZigZagIterator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more