Aria 2.0.0
C++23 MVVM framework (C++20 minimum) — reactive, coroutine-first, ABI-layered
Loading...
Searching...
No Matches
aria::reactive::Effect Class Reference

#include <effect.hpp>

Public Member Functions

template<std::invocable<> Fn>
 Effect (Fn fn)
 Runs fn once eagerly (to collect its initial dependency set), then automatically re-runs it whenever any tracked read changes.
 Effect (const Effect &)=delete
Effectoperator= (const Effect &)=delete
 Effect (Effect &&) noexcept=default
Effectoperator= (Effect &&) noexcept=default
void stop () noexcept
 Explicitly cancel (without waiting for destruction).
bool active () const noexcept
::aria::Subscription into_subscription () &&noexcept
 Transfer ownership into a unified aria::Subscription, so that an Effect can be dropped into any SubscriptionBag alongside other observers (Property::on_changed, EventBus::subscribe, ...).

Constructor & Destructor Documentation

◆ Effect() [1/3]

template<std::invocable<> Fn>
aria::reactive::Effect::Effect ( Fn fn)
inlineexplicit

Runs fn once eagerly (to collect its initial dependency set), then automatically re-runs it whenever any tracked read changes.

◆ Effect() [2/3]

aria::reactive::Effect::Effect ( const Effect & )
delete

◆ Effect() [3/3]

aria::reactive::Effect::Effect ( Effect && )
defaultnoexcept

Member Function Documentation

◆ operator=() [1/2]

Effect & aria::reactive::Effect::operator= ( const Effect & )
delete

◆ operator=() [2/2]

Effect & aria::reactive::Effect::operator= ( Effect && )
defaultnoexcept

◆ stop()

void aria::reactive::Effect::stop ( )
inlinenoexcept

Explicitly cancel (without waiting for destruction).

◆ active()

bool aria::reactive::Effect::active ( ) const
inlinenodiscardnoexcept

◆ into_subscription()

::aria::Subscription aria::reactive::Effect::into_subscription ( ) &&
inlinenodiscardnoexcept

Transfer ownership into a unified aria::Subscription, so that an Effect can be dropped into any SubscriptionBag alongside other observers (Property::on_changed, EventBus::subscribe, ...).


The documentation for this class was generated from the following file: