[−][src]Struct generic_vec::iter::RawDrain
This struct is created by GenericVec::raw_drain. See its documentation for more.
Implementations
impl<'a, T, S: ?Sized + Storage<T>> RawDrain<'a, T, S>[src]
pub fn remaining(&self) -> usize[src]
The number of remaining elements in range of this RawDrain
The RawDrain is complete when there are 0 remaining elements
pub fn is_complete(&self) -> bool[src]
Returns true if the RawDrain is complete
pub unsafe fn front(&mut self) -> &mut T[src]
Returns a reference to the next element if the RawDrain
Note: this does not advance the RawDrain
Safety
The RawDrain must not be complete
pub unsafe fn back(&mut self) -> &mut T[src]
Returns a reference to the last element if the RawDrain
Note: this does not advance the RawDrain
Safety
The RawDrain must not be complete
pub unsafe fn take_front(&mut self) -> T[src]
Removes the next element of the RawDrain, and the underlying GenericVec
and advances the RawDrain
Safety
The RawDrain must not be complete
pub unsafe fn take_back(&mut self) -> T[src]
Removes the last element of the RawDrain, and the underlying GenericVec
and advances the RawDrain
Safety
The RawDrain must not be complete
pub unsafe fn skip_front(&mut self)[src]
Skips the next element of the RawDrain, and keeps the element in the
underlying GenericVec and advances the RawDrain
Safety
The RawDrain must not be complete
pub unsafe fn skip_back(&mut self)[src]
Skips the last element of the RawDrain, and keeps the element in the
underlying GenericVec and advances the RawDrain
Safety
The RawDrain must not be complete
pub unsafe fn skip_n_front(&mut self, n: usize)[src]
Skips the next n elements of the RawDrain, and keeps them in the
underlying GenericVec and advances the RawDrain
Safety
The RawDrain have at least n remaining elements
pub unsafe fn skip_n_back(&mut self, n: usize)[src]
Skips the last n elements of the RawDrain, and keeps them in the
underlying GenericVec and advances the RawDrain
Safety
The RawDrain have at least n remaining elements
pub unsafe fn consume_write_front(&mut self, value: T)[src]
Write the value into empty space at the front of the RawDrain
Safety
The RawDrain must have taken at least 1 more element than it has
written from the front
pub unsafe fn consume_write_back(&mut self, value: T)[src]
Write the value into empty space at the back of the RawDrain
Safety
The RawDrain must have taken at least 1 more element than it has
written from the back
pub unsafe fn consume_write_slice_front(&mut self, slice: &[T])[src]
Write the slice into empty space at the front of the RawDrain
Safety
The RawDrain must have taken at least slice.len() more element than it has
written from the front
pub unsafe fn consume_write_slice_back(&mut self, slice: &[T])[src]
Write the slice into empty space at the back of the RawDrain
Safety
The RawDrain must have taken at least slice.len() more element than it has
written from the back
pub unsafe fn assert_space(&mut self, space: usize)[src]
Assert that there is at least space elements of room left to write into
the RawDrain, and the underlying GenericVec
Safety
the RawDrain must be complete
Trait Implementations
impl<T, S: ?Sized + Storage<T>, '_> Drop for RawDrain<'_, T, S>[src]
impl<'a, T, S: ?Sized + Storage<T>> From<RawDrain<'a, T, S>> for Drain<'a, T, S>[src]
Auto Trait Implementations
impl<'a, T, S: ?Sized> RefUnwindSafe for RawDrain<'a, T, S> where
S: RefUnwindSafe,
T: RefUnwindSafe,
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T, S> !Send for RawDrain<'a, T, S>
impl<'a, T, S> !Sync for RawDrain<'a, T, S>
impl<'a, T, S: ?Sized> Unpin for RawDrain<'a, T, S>
impl<'a, T, S> !UnwindSafe for RawDrain<'a, T, S>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,