pub struct ValueType {
pub name: &'static str,
pub global_name: &'static str,
/* private fields */
}Expand description
A definition of a type of data.
Contains a list of traits and trait methods that are available on that type.
Fields§
§name: &'static strA readable name of the type
global_name: &'static strThe fully qualitifed global name of the type.
Implementations§
Source§impl ValueType
impl ValueType
Sourcepub fn new<T: VcValueType>(global_name: &'static str) -> Self
pub fn new<T: VcValueType>(global_name: &'static str) -> Self
This is internally used by #[turbo_tasks::value]
Sourcepub fn new_with_any_serialization<T: VcValueType + Any + Serialize + for<'de> Deserialize<'de>>(
global_name: &'static str,
) -> Self
pub fn new_with_any_serialization<T: VcValueType + Any + Serialize + for<'de> Deserialize<'de>>( global_name: &'static str, ) -> Self
This is internally used by #[turbo_tasks::value]
pub fn any_as_serializable<'a>( &self, arc: &'a Arc<dyn Any + Sync + Send>, ) -> Option<&'a dyn Serialize>
pub fn is_serializable(&self) -> bool
pub fn get_any_deserialize_seed(&self) -> Option<AnyDeserializeSeed>
pub fn get_trait_method( &self, trait_method: &'static TraitMethod, ) -> Option<&'static NativeFunction>
pub fn has_trait(&self, trait_type: &TraitTypeId) -> bool
pub fn traits_iter(&self) -> impl Iterator<Item = TraitTypeId> + '_
Trait Implementations§
impl Eq for ValueType
Auto Trait Implementations§
impl Freeze for ValueType
impl !RefUnwindSafe for ValueType
impl Send for ValueType
impl Sync for ValueType
impl Unpin for ValueType
impl !UnwindSafe for ValueType
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
§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<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.