pub struct CachedTaskTypeArc(pub Arc<CachedTaskType>);Expand description
A reference-counted pointer to a CachedTaskType using triomphe::Arc.
triomphe::Arc saves one usize per allocation (no weak count) and avoids the weak-count
CAS in drop_slow compared to std::sync::Arc. We never need Weak<CachedTaskType>, so
the trade-off is favorable.
Tuple Fields§
§0: Arc<CachedTaskType>Implementations§
Methods from Deref<Target = CachedTaskType>§
Sourcepub fn get_name(&self) -> &'static str
pub fn get_name(&self) -> &'static str
Get the name of the function. Equivalent to the
Display/ToString::to_string implementation, but does not allocate a String.
Sourcepub fn hash_encode<H: DeterministicHasher>(&self, hasher: &mut H)
pub fn hash_encode<H: DeterministicHasher>(&self, hasher: &mut H)
Encodes this task type directly to a hasher, avoiding buffer allocation.
This uses the same encoding logic as TurboBincodeEncode but writes
directly to a DeterministicHasher instead of a buffer.
Sourcepub fn eq_components(
&self,
native_fn: &'static NativeFunction,
this: Option<RawVc>,
arg: &dyn DynTaskInputs,
) -> bool
pub fn eq_components( &self, native_fn: &'static NativeFunction, this: Option<RawVc>, arg: &dyn DynTaskInputs, ) -> bool
Check equality of components against this CachedTaskType.
Trait Implementations§
Source§impl AsRef<CachedTaskType> for CachedTaskTypeArc
impl AsRef<CachedTaskType> for CachedTaskTypeArc
Source§fn as_ref(&self) -> &CachedTaskType
fn as_ref(&self) -> &CachedTaskType
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Borrow<CachedTaskType> for CachedTaskTypeArc
impl Borrow<CachedTaskType> for CachedTaskTypeArc
Source§fn borrow(&self) -> &CachedTaskType
fn borrow(&self) -> &CachedTaskType
Immutably borrows from an owned value. Read more
Source§impl<'de, Context> BorrowDecode<'de, Context> for CachedTaskTypeArc
impl<'de, Context> BorrowDecode<'de, Context> for CachedTaskTypeArc
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 Clone for CachedTaskTypeArc
impl Clone for CachedTaskTypeArc
Source§fn clone(&self) -> CachedTaskTypeArc
fn clone(&self) -> CachedTaskTypeArc
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CachedTaskTypeArc
impl Debug for CachedTaskTypeArc
Source§impl<Context> Decode<Context> for CachedTaskTypeArc
impl<Context> Decode<Context> for CachedTaskTypeArc
Source§impl Deref for CachedTaskTypeArc
impl Deref for CachedTaskTypeArc
Source§type Target = CachedTaskType
type Target = CachedTaskType
The resulting type after dereferencing.
Source§fn deref(&self) -> &CachedTaskType
fn deref(&self) -> &CachedTaskType
Dereferences the value.
Source§impl Display for CachedTaskTypeArc
impl Display for CachedTaskTypeArc
Source§impl Encode for CachedTaskTypeArc
impl Encode for CachedTaskTypeArc
Source§impl Hash for CachedTaskTypeArc
impl Hash for CachedTaskTypeArc
Source§impl PartialEq for CachedTaskTypeArc
impl PartialEq for CachedTaskTypeArc
Source§fn eq(&self, other: &CachedTaskTypeArc) -> bool
fn eq(&self, other: &CachedTaskTypeArc) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for CachedTaskTypeArc
impl StructuralPartialEq for CachedTaskTypeArc
Auto Trait Implementations§
impl Freeze for CachedTaskTypeArc
impl !RefUnwindSafe for CachedTaskTypeArc
impl Send for CachedTaskTypeArc
impl Sync for CachedTaskTypeArc
impl Unpin for CachedTaskTypeArc
impl UnsafeUnpin for CachedTaskTypeArc
impl !UnwindSafe for CachedTaskTypeArc
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,
Source§impl<T> DynPartialEq for T
impl<T> DynPartialEq for T
fn dyn_partial_eq(&self, other: &(dyn Any + 'static)) -> bool
§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.