Lines Matching refs:usize

55     cap: usize,
93 pub fn with_capacity(capacity: usize) -> Self { in with_capacity()
101 pub fn with_capacity_zeroed(capacity: usize) -> Self { in with_capacity_zeroed()
112 pub(crate) const MIN_NON_ZERO_CAP: usize = if mem::size_of::<T>() == 1 {
131 pub fn with_capacity_in(capacity: usize, alloc: A) -> Self { in with_capacity_in() argument
138 pub fn try_with_capacity_in(capacity: usize, alloc: A) -> Result<Self, TryReserveError> { in try_with_capacity_in() argument
146 pub fn with_capacity_zeroed_in(capacity: usize, alloc: A) -> Self { in with_capacity_zeroed_in() argument
162 pub unsafe fn into_box(self, len: usize) -> Box<[MaybeUninit<T>], A> { in into_box()
177 fn allocate_in(capacity: usize, init: AllocInit, alloc: A) -> Self { in allocate_in() argument
212 … fn try_allocate_in(capacity: usize, init: AllocInit, alloc: A) -> Result<Self, TryReserveError> { in try_allocate_in() argument
247 pub unsafe fn from_raw_parts_in(ptr: *mut T, capacity: usize, alloc: A) -> Self { in from_raw_parts_in() argument
263 pub fn capacity(&self) -> usize { in capacity() argument
264 if T::IS_ZST { usize::MAX } else { self.cap } in capacity()
311 pub fn reserve(&mut self, len: usize, additional: usize) { in reserve() argument
319 len: usize, in reserve() argument
320 additional: usize, in reserve() argument
334 pub fn reserve_for_push(&mut self, len: usize) { in reserve_for_push() argument
339 pub fn try_reserve(&mut self, len: usize, additional: usize) -> Result<(), TryReserveError> { in try_reserve() argument
349 pub fn try_reserve_for_push(&mut self, len: usize) -> Result<(), TryReserveError> { in try_reserve_for_push()
371 pub fn reserve_exact(&mut self, len: usize, additional: usize) { in reserve_exact() argument
378 len: usize, in try_reserve_exact() argument
379 additional: usize, in try_reserve_exact() argument
395 pub fn shrink_to_fit(&mut self, cap: usize) { in shrink_to_fit() argument
403 fn needs_to_grow(&self, len: usize, additional: usize) -> bool { in needs_to_grow() argument
407 fn set_ptr_and_cap(&mut self, ptr: NonNull<[u8]>, cap: usize) { in set_ptr_and_cap() argument
422 fn grow_amortized(&mut self, len: usize, additional: usize) -> Result<(), TryReserveError> { in grow_amortized() argument
451 fn grow_exact(&mut self, len: usize, additional: usize) -> Result<(), TryReserveError> { in grow_exact() argument
468 fn shrink(&mut self, cap: usize) -> Result<(), TryReserveError> { in shrink()
550 fn alloc_guard(alloc_size: usize) -> Result<(), TryReserveError> { in alloc_guard()
551 if usize::BITS < 64 && alloc_size > isize::MAX as usize { in alloc_guard()