Lines Matching refs:arc
167 arc: Arc<T>,
222 let arc = Arc::from(unique);
223 // SAFETY: We just called `on_create_list_arc_from_unique` on an arc without a `ListArc`,
225 unsafe { Self::transmute_from_arc(arc) }
264 // SAFETY: We just called `on_create_list_arc_from_unique` on an arc without a `ListArc`
277 pub fn try_from_arc(arc: Arc<T>) -> Result<Self, Arc<T>>
281 if arc.try_new_list_arc() {
284 Ok(unsafe { Self::transmute_from_arc(arc) })
286 Err(arc)
293 pub fn try_from_arc_borrow(arc: ArcBorrow<'_, T>) -> Option<Self>
297 if arc.try_new_list_arc() {
300 Some(unsafe { Self::transmute_from_arc(Arc::from(arc)) })
310 pub fn try_from_arc_or_drop(arc: Arc<T>) -> Option<Self>
314 match Self::try_from_arc(arc) {
316 Err(arc) => Arc::into_unique_or_drop(arc).map(Self::from),
327 unsafe fn transmute_from_arc(arc: Arc<T>) -> Self {
329 Self { arc }
363 let arc = unsafe { Arc::from_raw(ptr) };
366 unsafe { Self::transmute_from_arc(arc) }
372 let arc = Self::transmute_to_arc(self);
374 unsafe { T::on_drop_list_arc(&arc) };
375 arc
381 self.arc.clone()
392 &self.arc
401 self.arc.as_arc_borrow()
407 Arc::ptr_eq(&this.arc, &other.arc)
419 self.arc.deref()
431 unsafe { T::on_drop_list_arc(&self.arc) };