Lines Matching refs:Box
80 pub struct Box<#[cfg_attr(CONFIG_RUSTC_HAS_COERCE_POINTEE, pointee)] T: ?Sized, A: Allocator>( struct
88 impl<T, U, A> core::ops::CoerceUnsized<Box<U, A>> for Box<T, A> implementation
99 impl<T, U, A> core::ops::DispatchFromDyn<Box<U, A>> for Box<T, A> implementation
117 pub type KBox<T> = Box<T, super::allocator::Kmalloc>;
129 pub type VBox<T> = Box<T, super::allocator::Vmalloc>;
141 pub type KVBox<T> = Box<T, super::allocator::KVmalloc>;
145 unsafe impl<T, A: Allocator> ZeroableOption for Box<T, A> {} implementation
148 unsafe impl<T, A> Send for Box<T, A> implementation
156 unsafe impl<T, A> Sync for Box<T, A> implementation
163 impl<T, A> Box<T, A> implementation
213 unsafe { &mut *Box::into_raw(b) } in leak()
217 impl<T, A> Box<MaybeUninit<T>, A> implementation
229 pub unsafe fn assume_init(self) -> Box<T, A> { in assume_init()
235 unsafe { Box::from_raw(raw.cast()) } in assume_init()
239 pub fn write(mut self, value: T) -> Box<T, A> { in write()
247 impl<T, A> Box<T, A> implementation
257 Ok(Box::write(b, x)) in new()
274 pub fn new_uninit(flags: Flags) -> Result<Box<MaybeUninit<T>, A>, AllocError> { in new_uninit()
280 Ok(Box(ptr.cast(), PhantomData)) in new_uninit()
286 pub fn pin(x: T, flags: Flags) -> Result<Pin<Box<T, A>>, AllocError> in pin()
300 fn forget_contents(this: Self) -> Box<MaybeUninit<T>, A> { in forget_contents()
304 unsafe { Box::from_raw(ptr.cast()) } in forget_contents()
320 pub fn drop_contents(this: Self) -> Box<MaybeUninit<T>, A> { in drop_contents()
339 impl<T, A> From<Box<T, A>> for Pin<Box<T, A>>
348 fn from(b: Box<T, A>) -> Self { in from()
355 impl<T, A> InPlaceWrite<T> for Box<MaybeUninit<T>, A> implementation
359 type Initialized = Box<T, A>;
367 Ok(unsafe { Box::assume_init(self) }) in write_init()
376 Ok(unsafe { Box::assume_init(self) }.into()) in write_pin_init()
380 impl<T, A> InPlaceInit<T> for Box<T, A> implementation
391 Box::<_, A>::new_uninit(flags)?.write_pin_init(init) in try_pin_init()
399 Box::<_, A>::new_uninit(flags)?.write_init(init) in try_init()
405 unsafe impl<T: 'static, A> ForeignOwnable for Box<T, A> implementation
414 Box::into_raw(self).cast() in into_foreign()
420 unsafe { Box::from_raw(ptr.cast()) } in from_foreign()
439 unsafe impl<T: 'static, A> ForeignOwnable for Pin<Box<T, A>>
449 Box::into_raw(unsafe { Pin::into_inner_unchecked(self) }).cast() in into_foreign()
455 unsafe { Pin::new_unchecked(Box::from_raw(ptr.cast())) } in from_foreign()
482 impl<T, A> Deref for Box<T, A> implementation
496 impl<T, A> DerefMut for Box<T, A> implementation
526 impl<T, A> Borrow<T> for Box<T, A> implementation
554 impl<T, A> BorrowMut<T> for Box<T, A> implementation
564 impl<T, A> fmt::Display for Box<T, A> implementation
574 impl<T, A> fmt::Debug for Box<T, A> implementation
584 impl<T, A> Drop for Box<T, A> implementation