Struct PeekMut

struct PeekMut<'a, T, A: Allocator = crate::alloc::Global> { ... }

Structure wrapping a mutable reference to the last item in a Vec.

This struct is created by the peek_mut method on Vec. See its documentation for more.

Implementations

impl<'a, T, A: Allocator> PeekMut<'a, T, A>

fn pop(this: Self) -> T

Removes the peeked value from the vector and returns it.

impl<'a, T, A = Global> UnwindSafe for PeekMut<'a, T, A>

impl<'a, T, A> Freeze for PeekMut<'a, T, A>

impl<'a, T, A> RefUnwindSafe for PeekMut<'a, T, A>

impl<'a, T, A> Send for PeekMut<'a, T, A>

impl<'a, T, A> Sync for PeekMut<'a, T, A>

impl<'a, T, A> Unpin for PeekMut<'a, T, A>

impl<'a, T, A> UnsafeUnpin for PeekMut<'a, T, A>

impl<'a, T, A: Allocator> Deref for PeekMut<'a, T, A>

fn deref(self: &Self) -> &<Self as >::Target

impl<'a, T, A: Allocator> DerefMut for PeekMut<'a, T, A>

fn deref_mut(self: &mut Self) -> &mut <Self as >::Target

impl<P, T> Receiver for PeekMut<'a, T, A>

impl<T> Any for PeekMut<'a, T, A>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for PeekMut<'a, T, A>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for PeekMut<'a, T, A>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> From for PeekMut<'a, T, A>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into for PeekMut<'a, T, A>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for PeekMut<'a, T, A>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for PeekMut<'a, T, A>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>

impl<T: fmt::Debug, A: Allocator> Debug for PeekMut<'_, T, A>

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result