pub struct OrdResolvedVc<T>where
T: ?Sized,{ /* private fields */ }Expand description
A thin wrapper on ResolvedVc that implements Ord. You must not depend on this to provide
deterministic execution (i.e. to produce externally-visible outputs, like when performing
chunking) as task ids are non-deterministic across cold executions.
This can be useful to provide a cache key. Given a single instance of turbo-tasks, this will
give stable results.
Implementations§
Source§impl<T> OrdResolvedVc<T>where
T: ?Sized,
impl<T> OrdResolvedVc<T>where
T: ?Sized,
Sourcepub fn new(node: ResolvedVc<T>) -> Self
pub fn new(node: ResolvedVc<T>) -> Self
Wraps a ResolvedVc so that it can be ordered. See the type-level documentation for the
caveats around determinism.
Sourcepub fn deref_vec(vec: Vec<OrdResolvedVc<T>>) -> Vec<ResolvedVc<T>>
pub fn deref_vec(vec: Vec<OrdResolvedVc<T>>) -> Vec<ResolvedVc<T>>
Cheaply converts a Vec of ordered ResolvedVcs to a Vec of ResolvedVcs.
Sourcepub fn deref_slice(s: &[OrdResolvedVc<T>]) -> &[ResolvedVc<T>]
pub fn deref_slice(s: &[OrdResolvedVc<T>]) -> &[ResolvedVc<T>]
Cheaply converts a slice of OrdResolvedVcs to a slice of
ResolvedVcs.
Trait Implementations§
Source§impl<'__de, T, __Context> BorrowDecode<'__de, __Context> for OrdResolvedVc<T>where
T: ?Sized,
impl<'__de, T, __Context> BorrowDecode<'__de, __Context> for OrdResolvedVc<T>where
T: ?Sized,
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl<T> Clone for OrdResolvedVc<T>where
T: ?Sized,
impl<T> Clone for OrdResolvedVc<T>where
T: ?Sized,
Source§impl<T> Debug for OrdResolvedVc<T>where
T: ?Sized,
impl<T> Debug for OrdResolvedVc<T>where
T: ?Sized,
Source§impl<T, __Context> Decode<__Context> for OrdResolvedVc<T>where
T: ?Sized,
impl<T, __Context> Decode<__Context> for OrdResolvedVc<T>where
T: ?Sized,
Source§impl<T> Deref for OrdResolvedVc<T>where
T: ?Sized,
impl<T> Deref for OrdResolvedVc<T>where
T: ?Sized,
Source§impl<'de, T> Deserialize<'de> for OrdResolvedVc<T>where
T: ?Sized,
impl<'de, T> Deserialize<'de> for OrdResolvedVc<T>where
T: ?Sized,
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> Encode for OrdResolvedVc<T>where
T: ?Sized,
impl<T> Encode for OrdResolvedVc<T>where
T: ?Sized,
Source§impl<T> From<ResolvedVc<T>> for OrdResolvedVc<T>where
T: ?Sized,
impl<T> From<ResolvedVc<T>> for OrdResolvedVc<T>where
T: ?Sized,
Source§fn from(node: ResolvedVc<T>) -> Self
fn from(node: ResolvedVc<T>) -> Self
Converts to this type from the input type.
Source§impl<T> Hash for OrdResolvedVc<T>where
T: ?Sized,
impl<T> Hash for OrdResolvedVc<T>where
T: ?Sized,
Source§impl<T> IntoFuture for &OrdResolvedVc<T>where
T: VcValueType,
impl<T> IntoFuture for &OrdResolvedVc<T>where
T: VcValueType,
Source§type Output = <ReadVcFuture<T> as Future>::Output
type Output = <ReadVcFuture<T> as Future>::Output
The output that the future will produce on completion.
Source§type IntoFuture = ReadVcFuture<T>
type IntoFuture = ReadVcFuture<T>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Source§impl<T> IntoFuture for &mut OrdResolvedVc<T>where
T: VcValueType,
impl<T> IntoFuture for &mut OrdResolvedVc<T>where
T: VcValueType,
Source§type Output = <ReadVcFuture<T> as Future>::Output
type Output = <ReadVcFuture<T> as Future>::Output
The output that the future will produce on completion.
Source§type IntoFuture = ReadVcFuture<T>
type IntoFuture = ReadVcFuture<T>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Source§impl<T> IntoFuture for OrdResolvedVc<T>where
T: VcValueType,
impl<T> IntoFuture for OrdResolvedVc<T>where
T: VcValueType,
Source§type Output = <ReadVcFuture<T> as Future>::Output
type Output = <ReadVcFuture<T> as Future>::Output
The output that the future will produce on completion.
Source§type IntoFuture = ReadVcFuture<T>
type IntoFuture = ReadVcFuture<T>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Source§impl<T> Ord for OrdResolvedVc<T>where
T: ?Sized,
impl<T> Ord for OrdResolvedVc<T>where
T: ?Sized,
1.21.0 (const: unstable) · 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 for OrdResolvedVc<T>where
T: ?Sized,
impl<T> PartialEq for OrdResolvedVc<T>where
T: ?Sized,
Source§impl<T> PartialOrd for OrdResolvedVc<T>where
T: ?Sized,
impl<T> PartialOrd for OrdResolvedVc<T>where
T: ?Sized,
Source§impl<T> Serialize for OrdResolvedVc<T>where
T: ?Sized,
impl<T> Serialize for OrdResolvedVc<T>where
T: ?Sized,
Source§impl<T> TaskInput for OrdResolvedVc<T>
impl<T> TaskInput for OrdResolvedVc<T>
Source§fn is_resolved(&self) -> bool
fn is_resolved(&self) -> bool
Source§fn is_transient(&self) -> bool
fn is_transient(&self) -> bool
Source§fn resolve_input(&self) -> impl Future<Output = Result<Self>> + Send + '_
fn resolve_input(&self) -> impl Future<Output = Result<Self>> + Send + '_
This method should resolve any
Vcs nested inside of this object, cloning the object in
the process. If the input is unresolved (TaskInput::is_resolved) a “local” resolution
task is created that runs this method.Source§impl<T> TraceRawVcs for OrdResolvedVc<T>where
T: ?Sized,
impl<T> TraceRawVcs for OrdResolvedVc<T>where
T: ?Sized,
fn trace_raw_vcs(&self, trace_context: &mut TraceRawVcsContext)
fn get_raw_vcs(&self) -> Vec<RawVc>
Source§impl<T> ValueDebugFormat for OrdResolvedVc<T>
Available on debug-assertions enabled only.
impl<T> ValueDebugFormat for OrdResolvedVc<T>
Available on debug-assertions enabled only.
fn value_debug_format(&self, depth: usize) -> ValueDebugFormatString<'_>
impl<T> Copy for OrdResolvedVc<T>where
T: ?Sized,
impl<T> Eq for OrdResolvedVc<T>where
T: ?Sized,
impl<T: NonLocalValue + ?Sized> NonLocalValue for OrdResolvedVc<T>
Auto Trait Implementations§
impl<T> Freeze for OrdResolvedVc<T>where
T: ?Sized,
impl<T> RefUnwindSafe for OrdResolvedVc<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Send for OrdResolvedVc<T>
impl<T> Sync for OrdResolvedVc<T>
impl<T> Unpin for OrdResolvedVc<T>where
T: ?Sized,
impl<T> UnsafeUnpin for OrdResolvedVc<T>where
T: ?Sized,
impl<T> UnwindSafe for OrdResolvedVc<T>where
T: UnwindSafe + ?Sized,
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
§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
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<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<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§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.