Lines Matching defs:RawVec

46 /// free its memory, but it *won't* try to drop its contents. It is up to the user of `RawVec`
47 /// to handle the actual things *stored* inside of a `RawVec`.
53 pub(crate) struct RawVec<T, A: Allocator = Global> {
59 impl<T> RawVec<T, Global> {
63 /// If you change `RawVec<T>::new` or dependencies, please take care to not introduce anything
67 /// Creates the biggest possible `RawVec` (on the system heap)
69 /// `RawVec` with capacity `0`. If `T` is zero-sized, then it makes a
70 /// `RawVec` with capacity `usize::MAX`. Useful for implementing
77 /// Creates a `RawVec` (on the system heap) with exactly the
79 /// equivalent to calling `RawVec::new` when `capacity` is `0` or `T` is
81 /// *not* get a `RawVec` with the requested capacity.
106 impl<T, A: Allocator> RawVec<T, A> {
121 /// the returned `RawVec`.
128 /// allocator for the returned `RawVec`.
136 /// allocator for the returned `RawVec`.
143 /// of allocator for the returned `RawVec`.
236 /// Reconstitutes a `RawVec` from a pointer, capacity, and allocator.
244 /// If the `ptr` and `capacity` come from a `RawVec` created via `alloc`, then this is
267 /// Returns a shared reference to the allocator backing this `RawVec`.
318 slf: &mut RawVec<T, A>,
400 impl<T, A: Allocator> RawVec<T, A> {
428 // 0, getting to here necessarily means the `RawVec` is overfull.
454 // 0, getting to here necessarily means the `RawVec` is overfull.
498 // This function is outside `RawVec` to minimize compile times. See the comment
499 // above `RawVec::grow_amortized` for details. (The `A` parameter isn't
511 // Check for the error here to minimize the size of `RawVec::grow_*`.
530 unsafe impl<#[may_dangle] T, A: Allocator> Drop for RawVec<T, A> {
531 /// Frees the memory owned by the `RawVec` *without* trying to drop its contents.