Skip to main content

value_impl

Attribute Macro value_impl 

Source
#[value_impl]
Expand description

A macro used on any impl block for a VcValueType. This can either be an inherent implementation or a trait implementation (see turbo_tasks::value_trait and VcValueTrait).

Methods should be annotated with the #[turbo_tasks::function] macro.

#[turbo_tasks::value_impl]
impl MyTrait for MyValue {
    #[turbo_tasks::function]
    fn method(&self, a: i32) -> Vc<Something> {
        todo!()
    }
}