Struct Splice
pub struct Splice<'a, I: Iterator + 'a, A: Allocator + 'a = Global> { pub(in ::collections::vec_deque) drain: Drain<'a, I::Item, A>, pub(in ::collections::vec_deque) replace_with: I }
A splicing iterator for VecDeque.
This struct is created by [VecDeque::splice()][super::VecDeque::splice].
See its documentation for more.
Example
#
# use VecDeque;
let mut v = from;
let new = ;
let iter: Splice = v.splice;
Fields
drain: Drain<'a, I::Item, A>replace_with: I
Trait Implementations
impl<'a, I: Debug + Iterator + 'a, A: Debug + Allocator + 'a> Debug for Splice<'a, I, A>
where
I::Item: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<I: Iterator, A: Allocator> DoubleEndedIterator for Splice<'_, I, A>
fn next_back(&mut self) -> Option<Self::Item>
impl<I: Iterator, A: Allocator> Drop for Splice<'_, I, A>
fn drop(&mut self)
impl<I: Iterator, A: Allocator> ExactSizeIterator for Splice<'_, I, A>
impl<I: Iterator, A: Allocator> Iterator for Splice<'_, I, A>
type Item = <I as Iterator>::Item;fn next(&mut self) -> Option<Self::Item>fn size_hint(&self) -> (usize, Option<usize>)
Auto Trait Implementations
impl<'a, I, A> Freeze for Splice<'a, I, A>
where
Drain<'a, <I as Iterator>::Item, A>: Freeze,
I: Freeze,
impl<'a, I, A> RefUnwindSafe for Splice<'a, I, A>
where
Drain<'a, <I as Iterator>::Item, A>: RefUnwindSafe,
I: RefUnwindSafe,
impl<'a, I, A> Send for Splice<'a, I, A>
where
Drain<'a, <I as Iterator>::Item, A>: Send,
I: Send,
impl<'a, I, A> Sync for Splice<'a, I, A>
where
Drain<'a, <I as Iterator>::Item, A>: Sync,
I: Sync,
impl<'a, I, A> Unpin for Splice<'a, I, A>
where
Drain<'a, <I as Iterator>::Item, A>: Unpin,
I: Unpin,
impl<'a, I, A> UnsafeUnpin for Splice<'a, I, A>
where
Drain<'a, <I as Iterator>::Item, A>: UnsafeUnpin,
I: UnsafeUnpin,
impl<'a, I, A> UnwindSafe for Splice<'a, I, A>
where
Drain<'a, <I as Iterator>::Item, A>: UnwindSafe,
I: UnwindSafe,
Blanket Implementations
impl<I> IntoIterator for Splice<'a, I, A>
where
I: Iterator,
type Item = <I as Iterator>::Item;type IntoIter = I;fn into_iter(self) -> I
impl<T> Any for Splice<'a, I, A>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Splice<'a, I, A>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Splice<'a, I, A>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for Splice<'a, I, A>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> SizeHint for Splice<'a, I, A>
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for Splice<'a, I, A>
impl<T, U> Into<U> for Splice<'a, I, A>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Splice<'a, I, A>
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for Splice<'a, I, A>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>