Lines Matching defs:arc
168 arc: Arc<T>,
223 let arc = Arc::from(unique);
224 // SAFETY: We just called `on_create_list_arc_from_unique` on an arc without a `ListArc`,
226 unsafe { Self::transmute_from_arc(arc) }
265 // SAFETY: We just called `on_create_list_arc_from_unique` on an arc without a `ListArc`
278 pub fn try_from_arc(arc: Arc<T>) -> Result<Self, Arc<T>>
282 if arc.try_new_list_arc() {
285 Ok(unsafe { Self::transmute_from_arc(arc) })
287 Err(arc)
294 pub fn try_from_arc_borrow(arc: ArcBorrow<'_, T>) -> Option<Self>
298 if arc.try_new_list_arc() {
301 Some(unsafe { Self::transmute_from_arc(Arc::from(arc)) })
311 pub fn try_from_arc_or_drop(arc: Arc<T>) -> Option<Self>
315 match Self::try_from_arc(arc) {
317 Err(arc) => Arc::into_unique_or_drop(arc).map(Self::from),
328 unsafe fn transmute_from_arc(arc: Arc<T>) -> Self {
330 Self { arc }
364 let arc = unsafe { Arc::from_raw(ptr) };
367 unsafe { Self::transmute_from_arc(arc) }
373 let arc = Self::transmute_to_arc(self);
375 unsafe { T::on_drop_list_arc(&arc) };
376 arc
382 self.arc.clone()
393 &self.arc
402 self.arc.as_arc_borrow()
408 Arc::ptr_eq(&this.arc, &other.arc)
420 self.arc.deref()
432 unsafe { T::on_drop_list_arc(&self.arc) };