Lines Matching refs:AllocError
5 use super::{AllocError, Flags};
20 fn with_capacity(capacity: usize, flags: Flags) -> Result<Self, AllocError>; in with_capacity() argument
35 fn push(&mut self, v: T, flags: Flags) -> Result<(), AllocError>; in push() argument
52 fn extend_from_slice(&mut self, other: &[T], flags: Flags) -> Result<(), AllocError> in extend_from_slice()
74 fn reserve(&mut self, additional: usize, flags: Flags) -> Result<(), AllocError>; in reserve() argument
78 fn with_capacity(capacity: usize, flags: Flags) -> Result<Self, AllocError> { in with_capacity() argument
84 fn push(&mut self, v: T, flags: Flags) -> Result<(), AllocError> { in push() argument
96 fn extend_from_slice(&mut self, other: &[T], flags: Flags) -> Result<(), AllocError> in extend_from_slice()
113 fn reserve(&mut self, additional: usize, _flags: Flags) -> Result<(), AllocError> { in reserve() argument
119 fn reserve(&mut self, additional: usize, flags: Flags) -> Result<(), AllocError> { in reserve() argument
129 return Err(AllocError); in reserve()
134 let new_cap = core::cmp::max(cap * 2, len.checked_add(additional).ok_or(AllocError)?); in reserve()
135 let layout = core::alloc::Layout::array::<T>(new_cap).map_err(|_| AllocError)?; in reserve()
155 Err(AllocError) in reserve()