[−][src]Struct fallible_collections::vec::TryVec
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>ⓘ
[src]
pub fn iter(&self) -> Iter<'_, 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]
&mut self,
new_len: usize,
f: F
) -> Result<(), TryReserveError> where
F: FnMut() -> T,
impl<T: TryClone> TryVec<TryVec<T>>
[src]
pub fn concat(&self) -> Result<TryVec<T>, TryReserveError>
[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]
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?
pub fn into_iter(self) -> Self::IntoIter
[src]
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?
pub fn into_iter(self) -> Self::IntoIter
[src]
impl<'_> PartialEq<&'_ str> for TryVec<u8>
[src]
pub fn eq(&self, other: &&str) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'a, T: PartialEq> PartialEq<&'a [T]> for TryVec<T>
[src]
pub fn eq(&self, other: &&[T]) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<T: PartialEq> PartialEq<TryVec<T>> for TryVec<T>
[src]
impl<T: PartialEq> PartialEq<Vec<T, Global>> for TryVec<T>
[src]
pub fn eq(&self, other: &Vec<T>) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<T> StructuralPartialEq for TryVec<T>
[src]
impl<T: TryClone> TryClone for TryVec<T>
[src]
pub fn try_clone(&self) -> Result<Self, TryReserveError>
[src]
impl<T: TryClone, '_> TryFrom<&'_ [T]> for TryVec<T>
[src]
type Error = TryReserveError
The type returned in the event of a conversion error.
pub fn try_from(value: &[T]) -> Result<Self, Self::Error>
[src]
impl<'_> TryFrom<&'_ str> for TryVec<u8>
[src]
Auto Trait Implementations
impl<T> Send for TryVec<T> where
T: Send,
T: Send,
impl<T> Sync for TryVec<T> where
T: Sync,
T: Sync,
impl<T> Unpin for TryVec<T> where
T: Unpin,
T: Unpin,
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<I, T> TryCollect<I> for T where
T: IntoIterator<Item = I>,
[src]
T: IntoIterator<Item = I>,
pub fn try_collect<C>(Self) -> Result<C, TryReserveError> where
C: TryFromIterator<I>,
[src]
C: TryFromIterator<I>,
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>,