Macro generic_type

Source
generic_type!() { /* proc-macro */ }
Expand description

Registers a value type that is generic over the Vc it contains.

ยงExample

use crate::generic_type as __turbo_tasks_internal_generic_type;

__turbo_tasks_internal_generic_type!(<A, B>, GenericType<Vc<A>, Vc<B>>);

// Now you can do the following, for any `A` and `B` value types:

let vc: Vc<GenericType<Vc<u32>, Vc<RcStr>>> = Vc::cell(
    GenericType::new(
        Vc::cell(42),
        Vc::cell("hello".to_string())
    )
);