Lines Matching refs:usize
56 cap: usize,
94 pub fn with_capacity(capacity: usize) -> Self { in with_capacity()
102 pub fn with_capacity_zeroed(capacity: usize) -> Self { in with_capacity_zeroed()
113 pub(crate) const MIN_NON_ZERO_CAP: usize = if mem::size_of::<T>() == 1 {
132 pub fn with_capacity_in(capacity: usize, alloc: A) -> Self { in with_capacity_in() argument
140 pub fn with_capacity_zeroed_in(capacity: usize, alloc: A) -> Self { in with_capacity_zeroed_in() argument
156 pub unsafe fn into_box(self, len: usize) -> Box<[MaybeUninit<T>], A> { in into_box()
171 fn allocate_in(capacity: usize, init: AllocInit, alloc: A) -> Self { in allocate_in() argument
217 pub unsafe fn from_raw_parts_in(ptr: *mut T, capacity: usize, alloc: A) -> Self { in from_raw_parts_in() argument
233 pub fn capacity(&self) -> usize { in capacity() argument
234 if mem::size_of::<T>() == 0 { usize::MAX } else { self.cap } in capacity()
276 pub fn reserve(&mut self, len: usize, additional: usize) { in reserve() argument
284 len: usize, in reserve() argument
285 additional: usize, in reserve() argument
299 pub fn reserve_for_push(&mut self, len: usize) { in reserve_for_push() argument
304 pub fn try_reserve(&mut self, len: usize, additional: usize) -> Result<(), TryReserveError> { in try_reserve() argument
314 pub fn try_reserve_for_push(&mut self, len: usize) -> Result<(), TryReserveError> { in try_reserve_for_push()
336 pub fn reserve_exact(&mut self, len: usize, additional: usize) { in reserve_exact() argument
343 len: usize, in try_reserve_exact() argument
344 additional: usize, in try_reserve_exact() argument
360 pub fn shrink_to_fit(&mut self, cap: usize) { in shrink_to_fit() argument
368 fn needs_to_grow(&self, len: usize, additional: usize) -> bool { in needs_to_grow() argument
372 fn set_ptr_and_cap(&mut self, ptr: NonNull<[u8]>, cap: usize) { in set_ptr_and_cap() argument
387 fn grow_amortized(&mut self, len: usize, additional: usize) -> Result<(), TryReserveError> { in grow_amortized() argument
416 fn grow_exact(&mut self, len: usize, additional: usize) -> Result<(), TryReserveError> { in grow_exact() argument
433 fn shrink(&mut self, cap: usize) -> Result<(), TryReserveError> { in shrink()
513 fn alloc_guard(alloc_size: usize) -> Result<(), TryReserveError> { in alloc_guard()
514 if usize::BITS < 64 && alloc_size > isize::MAX as usize { in alloc_guard()