pub trait Effect:
TraceRawVcs
+ NonLocalValue
+ Send
+ Sync
+ 'static {
type Error: EffectError;
// Required method
fn apply(&self) -> impl Future<Output = Result<(), Self::Error>> + Send;
}Required Associated Types§
type Error: EffectError
Required Methods§
Sourcefn apply(&self) -> impl Future<Output = Result<(), Self::Error>> + Send
fn apply(&self) -> impl Future<Output = Result<(), Self::Error>> + Send
A function that is called once at the top level of the program’s execution after everything has “settled”.
This function is executed outside of the turbo-tasks context, and therefore cannot read any
Vcs or call any turbo-task functions. The effect can store ResolvedVcs (or any other
Vc type), but should not read or resolve their contents.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.