[][src]Struct fallible_collections::vec::TryVec

pub struct TryVec<T> { /* fields omitted */ }

TryVec is a thin wrapper around alloc::vec::Vec to provide support for fallible allocation.

See the crate documentation for more.

Implementations

impl<T> TryVec<T>[src]

pub fn new() -> Self[src]

pub fn with_capacity(capacity: usize) -> Result<Self, TryReserveError>[src]

pub fn append(&mut self, other: &mut Self) -> Result<(), TryReserveError>[src]

pub fn as_mut_slice(&mut self) -> &mut [T][src]

pub fn as_slice(&self) -> &[T][src]

pub fn clear(&mut self)[src]

pub fn is_empty(&self) -> bool[src]

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

Notable traits for IterMut<'a, T>

impl<'a, T> Iterator for IterMut<'a, T> type Item = &'a mut T;
[src]

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

Notable traits for Iter<'a, T>

impl<'a, T> Iterator for Iter<'a, T> type Item = &'a T;
[src]

pub fn pop(&mut self) -> Option<T>[src]

pub fn push(&mut self, value: T) -> Result<(), TryReserveError>[src]

pub fn reserve(&mut self, additional: usize) -> Result<(), TryReserveError>[src]

pub fn resize_with<F>(
    &mut self,
    new_len: usize,
    f: F
) -> Result<(), TryReserveError> where
    F: FnMut() -> T, 
[src]

impl<T: TryClone> TryVec<TryVec<T>>[src]

impl<T: TryClone> TryVec<T>[src]

pub fn extend_from_slice(&mut self, other: &[T]) -> Result<(), TryReserveError>[src]

Trait Implementations

impl AsRef<[u8]> for TryVec<u8>[src]

impl<T: Debug> Debug for TryVec<T>[src]

impl<T> Default for TryVec<T>[src]

impl<T> Deref for TryVec<T>[src]

type Target = [T]

The resulting type after dereferencing.

impl<T> DerefMut for TryVec<T>[src]

impl<T> From<Vec<T, Global>> for TryVec<T>[src]

impl<T> IntoIterator for TryVec<T>[src]

type Item = T

The type of the elements being iterated over.

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?

impl<'a, T> IntoIterator for &'a TryVec<T>[src]

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?

impl<'_> PartialEq<&'_ str> for TryVec<u8>[src]

impl<'a, T: PartialEq> PartialEq<&'a [T]> for TryVec<T>[src]

impl<T: PartialEq> PartialEq<TryVec<T>> for TryVec<T>[src]

impl<T: PartialEq> PartialEq<Vec<T, Global>> for TryVec<T>[src]

impl<T> StructuralPartialEq for TryVec<T>[src]

impl<T: TryClone> TryClone for TryVec<T>[src]

impl<T: TryClone, '_> TryFrom<&'_ [T]> for TryVec<T>[src]

type Error = TryReserveError

The type returned in the event of a conversion error.

impl<'_> TryFrom<&'_ str> for TryVec<u8>[src]

type Error = TryReserveError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl<T> Send for TryVec<T> where
    T: Send

impl<T> Sync for TryVec<T> where
    T: Sync

impl<T> Unpin for TryVec<T> where
    T: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I, T> TryCollect<I> for T where
    T: IntoIterator<Item = I>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.