pub struct TransientInstance<T> { /* private fields */ }
Expand description
Pass a reference to an instance to a turbo-tasks function.
Equality and hash is implemented as pointer comparison.
Doesn’t require serialization, and won’t be stored in the persistent cache
in the future, so we don’t include the ValueTypeId
in the
SharedReference
.
Implementations§
Trait Implementations§
Source§impl<T> Clone for TransientInstance<T>
impl<T> Clone for TransientInstance<T>
Source§impl<T> Debug for TransientInstance<T>
impl<T> Debug for TransientInstance<T>
Source§impl<T: 'static> Deref for TransientInstance<T>
impl<T: 'static> Deref for TransientInstance<T>
Source§impl<'de, T> Deserialize<'de> for TransientInstance<T>
impl<'de, T> Deserialize<'de> for TransientInstance<T>
Source§fn deserialize<D>(_deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(_deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: Send + Sync + 'static> From<TransientInstance<T>> for Arc<T>
impl<T: Send + Sync + 'static> From<TransientInstance<T>> for Arc<T>
Source§fn from(instance: TransientInstance<T>) -> Self
fn from(instance: TransientInstance<T>) -> Self
Converts to this type from the input type.
Source§fn from(instance: TransientInstance<T>) -> Self
fn from(instance: TransientInstance<T>) -> Self
Converts to this type from the input type.
Source§impl<T> Hash for TransientInstance<T>
impl<T> Hash for TransientInstance<T>
Source§impl<T> PartialEq for TransientInstance<T>
impl<T> PartialEq for TransientInstance<T>
Source§impl<T> Serialize for TransientInstance<T>
impl<T> Serialize for TransientInstance<T>
Source§impl<T> TaskInput for TransientInstance<T>
impl<T> TaskInput for TransientInstance<T>
fn is_transient(&self) -> bool
fn resolve_input(&self) -> impl Future<Output = Result<Self>> + Send + '_
fn is_resolved(&self) -> bool
Source§impl<T: TraceRawVcs + 'static> TraceRawVcs for TransientInstance<T>
impl<T: TraceRawVcs + 'static> TraceRawVcs for TransientInstance<T>
fn trace_raw_vcs(&self, trace_context: &mut TraceRawVcsContext)
fn get_raw_vcs(&self) -> Vec<RawVc>
impl<T> Eq for TransientInstance<T>
impl<T: NonLocalValue> NonLocalValue for TransientInstance<T>
impl<T: OperationValue> OperationValue for TransientInstance<T>
Auto Trait Implementations§
impl<T> Freeze for TransientInstance<T>
impl<T> !RefUnwindSafe for TransientInstance<T>
impl<T> Send for TransientInstance<T>where
T: Send,
impl<T> Sync for TransientInstance<T>where
T: Sync,
impl<T> !Unpin for TransientInstance<T>
impl<T> !UnwindSafe for TransientInstance<T>
Blanket Implementations§
§impl<T> Any for Twhere
T: Any,
impl<T> Any for Twhere
T: Any,
fn get_type_id(&self) -> TypeId
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,
Source§impl<T> DynamicEqHash for T
impl<T> DynamicEqHash for T
§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
Checks if this value is equivalent to the given key. Read more
§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>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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