Lines Matching full:unique
10 use core::ptr::{self, NonNull, Unique};
36 /// * Produces `Unique::dangling()` on zero-sized types.
37 /// * Produces `Unique::dangling()` on zero-length allocations.
38 /// * Avoids freeing `Unique::dangling()`.
43 /// * Contains a `ptr::Unique` and thus endows the user with all related benefits.
55 ptr: Unique<T>,
125 Self { ptr: Unique::dangling(), cap: 0, alloc } in new_in()
199 ptr: unsafe { Unique::new_unchecked(ptr.cast().as_ptr()) }, in allocate_in()
218 Self { ptr: unsafe { Unique::new_unchecked(ptr) }, cap: capacity, alloc } in from_raw_parts_in()
222 /// `Unique::dangling()` if `capacity == 0` or `T` is zero-sized. In the former case, you must
376 self.ptr = unsafe { Unique::new_unchecked(ptr.cast().as_ptr()) }; in set_ptr_and_cap()