Home
last modified time | relevance | path

Searched refs:capacity (Results 1 – 3 of 3) sorted by relevance

/rust/alloc/
Draw_vec.rs94 pub fn with_capacity(capacity: usize) -> Self { in with_capacity()
95 Self::with_capacity_in(capacity, Global) in with_capacity()
102 pub fn with_capacity_zeroed(capacity: usize) -> Self { in with_capacity_zeroed()
103 Self::with_capacity_zeroed_in(capacity, Global) in with_capacity_zeroed()
132 pub fn with_capacity_in(capacity: usize, alloc: A) -> Self { in with_capacity_in()
133 Self::allocate_in(capacity, AllocInit::Uninitialized, alloc) in with_capacity_in()
140 pub fn with_capacity_zeroed_in(capacity: usize, alloc: A) -> Self { in with_capacity_zeroed_in()
141 Self::allocate_in(capacity, AllocInit::Zeroed, alloc) in with_capacity_zeroed_in()
159 len <= self.capacity(), in into_box()
171 fn allocate_in(capacity: usize, init: AllocInit, alloc: A) -> Self { in allocate_in()
[all …]
Dslice.rs570 let capacity = self.len().checked_mul(n).expect("capacity overflow"); in repeat() localVariable
571 let mut buf = Vec::with_capacity(capacity); in repeat()
597 let rem_len = capacity - buf.len(); // `self.len() * rem` in repeat()
608 buf.set_len(capacity); in repeat()
/rust/alloc/vec/
Dmod.rs471 pub fn with_capacity(capacity: usize) -> Self { in with_capacity()
472 Self::with_capacity_in(capacity, Global) in with_capacity()
545 pub unsafe fn from_raw_parts(ptr: *mut T, length: usize, capacity: usize) -> Self { in from_raw_parts()
546 unsafe { Self::from_raw_parts_in(ptr, length, capacity, Global) } in from_raw_parts()
616 pub fn with_capacity_in(capacity: usize, alloc: A) -> Self { in with_capacity_in()
617 Vec { buf: RawVec::with_capacity_in(capacity, alloc), len: 0 } in with_capacity_in()
692 pub unsafe fn from_raw_parts_in(ptr: *mut T, length: usize, capacity: usize, alloc: A) -> Self { in from_raw_parts_in()
693 unsafe { Vec { buf: RawVec::from_raw_parts_in(ptr, capacity, alloc), len: length } } in from_raw_parts_in()
731 (me.as_mut_ptr(), me.len(), me.capacity()) in into_raw_parts()
776 let capacity = me.capacity(); in into_raw_parts_with_alloc() localVariable
[all …]