pub struct UnsizedStack<T: ?Sized> { /* private fields */ }

Implementations§

source§

impl<T: ?Sized> UnsizedStack<T>

source

pub const fn new() -> Self

source

pub const fn bytes_occupied(&self) -> usize

source

pub const fn buf_layout(&self) -> Layout

source

pub const fn buf_ptr(&self) -> NonNull<u8>

source

pub fn get(&self, index: usize) -> Option<&T>

source

pub fn get_mut(&mut self, index: usize) -> Option<&mut T>

source

pub fn push<I>(&mut self, item: I, coercion: fn(_: &I) -> &T)

source

pub fn len(&self) -> usize

source

pub fn is_empty(&self) -> bool

source

pub fn pop(&mut self) -> Option<()>

source

pub fn iter(&self) -> Iter<'_, T>

source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

source

pub fn clear(&mut self)

Trait Implementations§

source§

impl<T: ?Sized + Debug> Debug for UnsizedStack<T>

source§

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

Formats the value using the given formatter. Read more
source§

impl<T: ?Sized> Default for UnsizedStack<T>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<T: ?Sized> Index<usize> for UnsizedStack<T>

§

type Output = T

The returned type after indexing.
source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<T: ?Sized> IndexMut<usize> for UnsizedStack<T>

source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<'a, T: ?Sized> IntoIterator for &'a UnsizedStack<T>

§

type Item = &'a T

The type of the elements being iterated over.
§

type IntoIter = Iter<'a, T>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl<'a, T: ?Sized> IntoIterator for &'a mut UnsizedStack<T>

§

type Item = &'a mut T

The type of the elements being iterated over.
§

type IntoIter = IterMut<'a, T>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

Auto Trait Implementations§

§

impl<T: ?Sized> RefUnwindSafe for UnsizedStack<T>where T: RefUnwindSafe,

§

impl<T> !Send for UnsizedStack<T>

§

impl<T> !Sync for UnsizedStack<T>

§

impl<T: ?Sized> Unpin for UnsizedStack<T>where T: Unpin,

§

impl<T: ?Sized> UnwindSafe for UnsizedStack<T>where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

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

Performs the conversion.