pub trait Effect:
Send
+ Sync
+ NonLocalValue
+ ValueDebug {
// Required method
fn capture<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn CapturedEffect>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
An IO Side effect to be computed by turbo tasks and then executed outside of turbo tasks.
Required Methods§
Sourcefn capture<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn CapturedEffect>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn capture<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn CapturedEffect>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Read any Vc data needed for apply() and return the CapturedEffect that performs it.
An implementation may elect to elide capturing data if the EffectStateStorage state is
already up to date.
Trait Implementations§
Source§impl VcValueTrait for Box<dyn Effect>
impl VcValueTrait for Box<dyn Effect>
Source§const IMPL_VTABLES: &'static VTableRegistry<Self::ValueTrait>
const IMPL_VTABLES: &'static VTableRegistry<Self::ValueTrait>
The per-trait vtable registry, populated by [crate::value_type::register_all_trait_methods] Read more
type ValueTrait = dyn Effect
Source§fn get_trait_type_id() -> TraitTypeId
fn get_trait_type_id() -> TraitTypeId
Returns the type id of the trait object.
impl Dynamic<Box<dyn Effect>> for Box<dyn Effect>
impl Dynamic<Box<dyn ValueDebug>> for Box<dyn Effect>
Available on debug-assertions enabled only.
impl Upcast<Box<dyn Effect>> for Box<dyn Effect>
impl Upcast<Box<dyn ValueDebug>> for Box<dyn Effect>
Available on debug-assertions enabled only.
impl UpcastStrict<Box<dyn ValueDebug>> for Box<dyn Effect>
Available on debug-assertions enabled only.