Lines Matching refs:A

81 pub struct Box<#[cfg_attr(CONFIG_RUSTC_HAS_COERCE_POINTEE, pointee)] T: ?Sized, A: Allocator>(
83 PhantomData<A>,
89 impl<T, U, A> core::ops::CoerceUnsized<Box<U, A>> for Box<T, A>
93 A: Allocator,
100 impl<T, U, A> core::ops::DispatchFromDyn<Box<U, A>> for Box<T, A>
104 A: Allocator,
146 unsafe impl<T, A: Allocator> ZeroableOption for Box<T, A> {}
149 unsafe impl<T, A> Send for Box<T, A>
152 A: Allocator,
157 unsafe impl<T, A> Sync for Box<T, A>
160 A: Allocator,
164 impl<T, A> Box<T, A>
167 A: Allocator,
218 impl<T, A> Box<MaybeUninit<T>, A>
220 A: Allocator,
230 pub unsafe fn assume_init(self) -> Box<T, A> { in assume_init() argument
240 pub fn write(mut self, value: T) -> Box<T, A> { in write() argument
248 impl<T, A> Box<T, A>
250 A: Allocator,
275 pub fn new_uninit(flags: Flags) -> Result<Box<MaybeUninit<T>, A>, AllocError> { in new_uninit() argument
277 let ptr = A::alloc(layout, flags, NumaNode::NO_NODE)?; in new_uninit()
287 pub fn pin(x: T, flags: Flags) -> Result<Pin<Box<T, A>>, AllocError> in pin() argument
289 A: 'static, in pin()
340 ) -> Result<Pin<Box<[T], A>>, E> in pin_slice() argument
346 let mut buffer = super::Vec::<T, A>::with_capacity(len, flags)?; in pin_slice()
378 fn forget_contents(this: Self) -> Box<MaybeUninit<T>, A> { in forget_contents() argument
398 pub fn drop_contents(this: Self) -> Box<MaybeUninit<T>, A> { in drop_contents() argument
417 impl<T, A> From<Box<T, A>> for Pin<Box<T, A>>
420 A: Allocator,
426 fn from(b: Box<T, A>) -> Self { in from()
433 impl<T, A> InPlaceWrite<T> for Box<MaybeUninit<T>, A>
435 A: Allocator + 'static,
437 type Initialized = Box<T, A>;
458 impl<T, A> InPlaceInit<T> for Box<T, A>
460 A: Allocator + 'static,
469 Box::<_, A>::new_uninit(flags)?.write_pin_init(init) in try_pin_init()
477 Box::<_, A>::new_uninit(flags)?.write_init(init) in try_init()
483 unsafe impl<T: 'static, A> ForeignOwnable for Box<T, A>
485 A: Allocator,
487 const FOREIGN_ALIGN: usize = if core::mem::align_of::<T>() < A::MIN_ALIGN {
488 A::MIN_ALIGN
522 unsafe impl<T: 'static, A> ForeignOwnable for Pin<Box<T, A>>
524 A: Allocator,
526 const FOREIGN_ALIGN: usize = <Box<T, A> as ForeignOwnable>::FOREIGN_ALIGN;
565 impl<T, A> Deref for Box<T, A>
568 A: Allocator,
579 impl<T, A> DerefMut for Box<T, A>
582 A: Allocator,
609 impl<T, A> Borrow<T> for Box<T, A>
612 A: Allocator,
637 impl<T, A> BorrowMut<T> for Box<T, A>
640 A: Allocator,
647 impl<T, A> fmt::Display for Box<T, A>
650 A: Allocator,
657 impl<T, A> fmt::Debug for Box<T, A>
660 A: Allocator,
667 impl<T, A> Drop for Box<T, A>
670 A: Allocator,
681 unsafe { A::free(self.0.cast(), layout) }; in drop()