pub struct TransientValue<T> { /* private fields */ }
Expand description
Pass a value by value (Value<Xxx>
) instead of by reference (Vc<Xxx>
).
Doesn’t require serialization, and won’t be stored in the persistent cache in the future.
Implementations§
Source§impl<T> TransientValue<T>
impl<T> TransientValue<T>
pub fn new(value: T) -> Self
pub fn into_value(self) -> T
Trait Implementations§
Source§impl<T: Clone> Clone for TransientValue<T>
impl<T: Clone> Clone for TransientValue<T>
Source§fn clone(&self) -> TransientValue<T>
fn clone(&self) -> TransientValue<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Debug> Debug for TransientValue<T>
impl<T: Debug> Debug for TransientValue<T>
Source§impl<T> Deref for TransientValue<T>
impl<T> Deref for TransientValue<T>
Source§impl<'de, T> Deserialize<'de> for TransientValue<T>
impl<'de, T> Deserialize<'de> for TransientValue<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: Hash> Hash for TransientValue<T>
impl<T: Hash> Hash for TransientValue<T>
Source§impl<T: Ord> Ord for TransientValue<T>
impl<T: Ord> Ord for TransientValue<T>
Source§fn cmp(&self, other: &TransientValue<T>) -> Ordering
fn cmp(&self, other: &TransientValue<T>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialEq> PartialEq for TransientValue<T>
impl<T: PartialEq> PartialEq for TransientValue<T>
Source§impl<T: PartialOrd> PartialOrd for TransientValue<T>
impl<T: PartialOrd> PartialOrd for TransientValue<T>
Source§impl<T> Serialize for TransientValue<T>
impl<T> Serialize for TransientValue<T>
Source§impl<T> TaskInput for TransientValue<T>
impl<T> TaskInput for TransientValue<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> TraceRawVcs for TransientValue<T>
impl<T: TraceRawVcs> TraceRawVcs for TransientValue<T>
fn trace_raw_vcs(&self, trace_context: &mut TraceRawVcsContext)
fn get_raw_vcs(&self) -> Vec<RawVc>
impl<T: Eq> Eq for TransientValue<T>
impl<T: NonLocalValue> NonLocalValue for TransientValue<T>
impl<T: OperationValue> OperationValue for TransientValue<T>
impl<T> StructuralPartialEq for TransientValue<T>
Auto Trait Implementations§
impl<T> Freeze for TransientValue<T>where
T: Freeze,
impl<T> RefUnwindSafe for TransientValue<T>where
T: RefUnwindSafe,
impl<T> Send for TransientValue<T>where
T: Send,
impl<T> Sync for TransientValue<T>where
T: Sync,
impl<T> Unpin for TransientValue<T>where
T: Unpin,
impl<T> UnwindSafe for TransientValue<T>where
T: UnwindSafe,
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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