pub struct InPlaceVecBuilder<'a, T> { /* private fields */ }
Expand description
builds a SmallVec out of itself
Implementations§
Source§impl<'a, T> InPlaceVecBuilder<'a, T>
impl<'a, T> InPlaceVecBuilder<'a, T>
Sourcepub fn target_slice(&self) -> &[T]
pub fn target_slice(&self) -> &[T]
The current target part as a slice
Sourcepub fn source_slice(&self) -> &[T]
pub fn source_slice(&self) -> &[T]
The current source part as a slice
Sourcepub fn source_slice_mut(&mut self) -> &mut [T]
pub fn source_slice_mut(&mut self) -> &mut [T]
The current source part as a slice
Sourcepub fn extend_from_iter<I: Iterator<Item = T>>(&mut self, iter: I, n: usize)
pub fn extend_from_iter<I: Iterator<Item = T>>(&mut self, iter: I, n: usize)
Take at most n
elements from iter
to the target
Sourcepub fn consume(&mut self, n: usize, take: bool)
pub fn consume(&mut self, n: usize, take: bool)
Consume n
elements from the source. If take
is true they will be added to the target,
else they will be dropped.
Sourcepub fn skip(&mut self, n: usize)
pub fn skip(&mut self, n: usize)
Skip up to n
elements from source without adding them to the target.
They will be immediately dropped!
Trait Implementations§
Source§impl<'a, T: Debug> Debug for InPlaceVecBuilder<'a, T>
impl<'a, T: Debug> Debug for InPlaceVecBuilder<'a, T>
Source§impl<'a, T> Drop for InPlaceVecBuilder<'a, T>
the purpose of drop is to clean up and make the SmallVec that we reference into a normal
SmallVec again.
impl<'a, T> Drop for InPlaceVecBuilder<'a, T>
the purpose of drop is to clean up and make the SmallVec that we reference into a normal SmallVec again.
Auto Trait Implementations§
impl<'a, T> Freeze for InPlaceVecBuilder<'a, T>
impl<'a, T> RefUnwindSafe for InPlaceVecBuilder<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for InPlaceVecBuilder<'a, T>where
T: Send,
impl<'a, T> Sync for InPlaceVecBuilder<'a, T>where
T: Sync,
impl<'a, T> Unpin for InPlaceVecBuilder<'a, T>
impl<'a, T> !UnwindSafe for InPlaceVecBuilder<'a, T>
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