Lines Matching refs:new
160 let refcount_layout = Layout::new::<bindings::refcount_t>(); in container_of()
229 pub fn new(contents: T, flags: Flags) -> Result<Self, AllocError> { in new() method
233 refcount: Opaque::new(unsafe { bindings::REFCOUNT_INIT(1) }), in new()
237 let inner = KBox::new(value, flags)?; in new()
305 unsafe { ArcBorrow::new(self.ptr) } in as_arc_borrow()
349 let me = ManuallyDrop::new(self); in into_unique_or_drop()
385 ManuallyDrop::new(self).ptr.as_ptr().cast() in into_foreign()
406 unsafe { ArcBorrow::new(inner) } in borrow()
593 unsafe fn new(inner: NonNull<ArcInner<T>>) -> Self { in new() method
619 unsafe { Self::new(ptr) } in from_raw()
628 ManuallyDrop::new(unsafe { Arc::from_inner(b.inner) }) in from()
766 pub fn new(value: T, flags: Flags) -> Result<Self, AllocError> { in new() method
769 inner: Arc::new(value, flags)?, in new()
779 refcount: Opaque::new(unsafe { bindings::REFCOUNT_INIT(1) }), in new_uninit()
807 let inner = ManuallyDrop::new(self).inner.ptr; in assume_init()