Trait alloc_safe::VecAllocExt
source · [−]pub trait VecAllocExt<T, A: Allocator>: Sized + Sealed {
fn try_with_capacity_in(
capacity: usize,
alloc: A
) -> Result<Self, AllocError>;
fn try_push(&mut self, value: T) -> Result<(), AllocError>;
fn try_resize(&mut self, new_len: usize, value: T) -> Result<(), AllocError>
where
T: Copy;
fn try_resize_with<F>(
&mut self,
new_len: usize,
f: F
) -> Result<(), AllocError>
where
F: FnMut() -> T;
fn try_copy_from_slice(&mut self, other: &[T]) -> Result<(), AllocError>
where
T: Copy;
}Expand description
Extension for Vec<T, A>