Skip to main content

OrdResolvedVc

Struct OrdResolvedVc 

Source
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,

Source

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.

Source

pub fn deref_vec(vec: Vec<OrdResolvedVc<T>>) -> Vec<ResolvedVc<T>>

Cheaply converts a Vec of ordered ResolvedVcs to a Vec of ResolvedVcs.

Source

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,

Source§

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,

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T> Debug for OrdResolvedVc<T>
where T: ?Sized,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T, __Context> Decode<__Context> for OrdResolvedVc<T>
where T: ?Sized,

Source§

fn decode<__D: Decoder<Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>

Attempt to decode this type with the given Decode.
Source§

impl<T> Deref for OrdResolvedVc<T>
where T: ?Sized,

Source§

type Target = ResolvedVc<T>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

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>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<T> Encode for OrdResolvedVc<T>
where T: ?Sized,

Source§

fn encode<__E: Encoder>(&self, encoder: &mut __E) -> Result<(), EncodeError>

Encode a given type.
Source§

impl<T> From<ResolvedVc<T>> for OrdResolvedVc<T>
where T: ?Sized,

Source§

fn from(node: ResolvedVc<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> Hash for OrdResolvedVc<T>
where T: ?Sized,

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<T> IntoFuture for &OrdResolvedVc<T>
where T: VcValueType,

Source§

type Output = <ReadVcFuture<T> as Future>::Output

The output that the future will produce on completion.
Source§

type IntoFuture = ReadVcFuture<T>

Which kind of future are we turning this into?
Source§

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,

Source§

type Output = <ReadVcFuture<T> as Future>::Output

The output that the future will produce on completion.
Source§

type IntoFuture = ReadVcFuture<T>

Which kind of future are we turning this into?
Source§

fn into_future(self) -> Self::IntoFuture

Creates a future from a value. Read more
Source§

impl<T> IntoFuture for OrdResolvedVc<T>
where T: VcValueType,

Source§

type Output = <ReadVcFuture<T> as Future>::Output

The output that the future will produce on completion.
Source§

type IntoFuture = ReadVcFuture<T>

Which kind of future are we turning this into?
Source§

fn into_future(self) -> Self::IntoFuture

Creates a future from a value. Read more
Source§

impl<T> Ord for OrdResolvedVc<T>
where T: ?Sized,

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<T> PartialEq for OrdResolvedVc<T>
where T: ?Sized,

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> PartialOrd for OrdResolvedVc<T>
where T: ?Sized,

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<T> Serialize for OrdResolvedVc<T>
where T: ?Sized,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<T> TaskInput for OrdResolvedVc<T>
where T: Send + Sync + ?Sized,

Source§

fn is_resolved(&self) -> bool

This should return true if there are any unresolved Vcs in the type. Read more
Source§

fn is_transient(&self) -> bool

This should return true if this object contains a Vc (or any subtype of Vc) pointing to a cell owned by a transient task. Read more
Source§

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,

Source§

fn trace_raw_vcs(&self, trace_context: &mut TraceRawVcsContext)

Source§

fn get_raw_vcs(&self) -> Vec<RawVc>

Source§

impl<T> ValueDebugFormat for OrdResolvedVc<T>
where T: UpcastStrict<Box<dyn ValueDebug>> + Send + Sync + ?Sized,

Available on debug-assertions enabled only.
Source§

impl<T> Copy for OrdResolvedVc<T>
where T: ?Sized,

Source§

impl<T> Eq for OrdResolvedVc<T>
where T: ?Sized,

Source§

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>
where T: Send + ?Sized,

§

impl<T> Sync for OrdResolvedVc<T>
where T: Sync + ?Sized,

§

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§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<T> DynHash for T
where T: Any + Hash,

§

fn dyn_hash(&self, state: &mut dyn Hasher)

§

impl<T> DynPartialEq for T
where T: Any + PartialEq,

§

fn dyn_partial_eq(&self, other: &(dyn Any + 'static)) -> bool

Source§

impl<T> DynTaskInputs for T
where T: Debug + Eq + Hash + Send + Sync + TraceRawVcs + 'static,

Source§

fn dyn_type_name(&self) -> &'static str

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

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
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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

§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
§

impl<T> Pointee for T

§

type Metadata = ()

The metadata type for pointers and references to this type.
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> DynEq for T
where T: Any + Eq,