pub struct GcRoot<T: ?Sized> { /* private fields */ }Expand description
An RAII guard that pins an OperationVc’s task against garbage collection.
Implementations§
Source§impl<T: ?Sized> GcRoot<T>
impl<T: ?Sized> GcRoot<T>
Sourcepub fn pin(tt: Arc<dyn TurboTasksApi>, vc: OperationVc<T>) -> Self
pub fn pin(tt: Arc<dyn TurboTasksApi>, vc: OperationVc<T>) -> Self
Pins vc’s task, returning a guard that unpins it on drop.
Trait Implementations§
Source§impl<T: ?Sized> Borrow<OperationVc<T>> for GcRoot<T>
impl<T: ?Sized> Borrow<OperationVc<T>> for GcRoot<T>
Source§fn borrow(&self) -> &OperationVc<T>
fn borrow(&self) -> &OperationVc<T>
Immutably borrows from an owned value. Read more
Source§impl<T: ?Sized> Deref for GcRoot<T>
A guard derefs to the operation it pins, so OperationVc’s own methods can be called on it
directly and *guard recovers the operation itself.
impl<T: ?Sized> Deref for GcRoot<T>
A guard derefs to the operation it pins, so OperationVc’s own methods can be called on it
directly and *guard recovers the operation itself.
impl<T: ?Sized> Eq for GcRoot<T>
Source§impl<T: ?Sized> Hash for GcRoot<T>
impl<T: ?Sized> Hash for GcRoot<T>
impl<T: NonLocalValue + ?Sized> NonLocalValue for GcRoot<T>
Safety: mirrors the OperationVc impl — a GcRoot holds no task-local data beyond the
operation it pins.
impl<T: ?Sized + Send> OperationValue for GcRoot<T>
Safety: a GcRoot contains exactly one OperationVc and no Vc or ResolvedVc, which
is what OperationValue asserts.
Source§impl<T: ?Sized> PartialEq for GcRoot<T>
impl<T: ?Sized> PartialEq for GcRoot<T>
Source§impl<T: ?Sized> TraceRawVcs for GcRoot<T>
impl<T: ?Sized> TraceRawVcs for GcRoot<T>
fn trace_raw_vcs(&self, trace_context: &mut TraceRawVcsContext)
fn get_raw_vcs(&self) -> Vec<RawVc>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for GcRoot<T>
impl<T> !UnwindSafe for GcRoot<T>
impl<T> Freeze for GcRoot<T>where
T: ?Sized,
impl<T> Send for GcRoot<T>
impl<T> Sync for GcRoot<T>
impl<T> Unpin for GcRoot<T>
impl<T> UnsafeUnpin for GcRoot<T>where
T: ?Sized,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DynEq for T
§impl<T> DynPartialEq for T
impl<T> DynPartialEq for T
fn dyn_partial_eq(&self, other: &(dyn Any + 'static)) -> bool
Source§impl<T> DynTaskInputs for T
impl<T> DynTaskInputs for T
fn dyn_type_name(&self) -> &'static str
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more