pub struct Owner { /* private fields */ }Implementations§
Source§impl Owner
impl Owner
Sourcepub fn resource<K, T, E, F>(
&self,
source: impl Fn() -> K + 'static,
load: impl Fn(K) -> F + 'static,
) -> Resource<K, T, E>
pub fn resource<K, T, E, F>( &self, source: impl Fn() -> K + 'static, load: impl Fn(K) -> F + 'static, ) -> Resource<K, T, E>
Start/restart after tracked source-key changes at the effect phase. A missing Host produces Unavailable rather than a blocking fallback.
pub fn resource_seeded<K, T, E, F>( &self, source: impl Fn() -> K + 'static, load: impl Fn(K) -> F + 'static, seed: Option<ResourceSeed<K, T, E>>, ) -> Resource<K, T, E>
Source§impl Owner
impl Owner
Sourcepub fn enter<R>(&self, f: impl FnOnce() -> R) -> R
pub fn enter<R>(&self, f: impl FnOnce() -> R) -> R
Derived maps created by this widget/factory belong to this owner, even when their source is application-wide. The context never owns data.
pub fn runtime(&self) -> RuntimeId
pub fn is_alive(&self) -> bool
pub fn child(&self) -> Self
pub fn dispose(&self)
Sourcepub fn on_cleanup(
&self,
cleanup: impl FnOnce() + 'static,
) -> Result<(), AccessError>
pub fn on_cleanup( &self, cleanup: impl FnOnce() + 'static, ) -> Result<(), AccessError>
Run untracked after this Owner and its descendants have been invalidated. Implicit map/path construction remains in the retired Owner and fails; explicit entry into another live Owner is allowed. Callbacks run without graph borrows, in reverse registration order (children before parents). A panic unwinds normally; there is no catch/retry of remaining callbacks.
pub fn cage<T: 'static>(&self, value: T) -> Cage<T>
Sourcepub fn compute<T>(&self, f: impl FnOnce() -> T) -> Result<T, AccessError>
pub fn compute<T>(&self, f: impl FnOnce() -> T) -> Result<T, AccessError>
Synchronous, untracked pure computation under this live Owner. Allocates no reactive node. Both reads and unwind restore the outer tracking/mode/construction context; writes/creation remain forbidden.
pub fn bond<T: 'static>(&self, mapper: impl Fn() -> T + 'static) -> Bond<T>
pub fn binding(&self, callback: impl FnMut() + 'static) -> BindingId
Sourcepub fn effect(&self, callback: impl FnMut() + 'static) -> BindingId
pub fn effect(&self, callback: impl FnMut() + 'static) -> BindingId
Effects run after currently queued bindings. Writes enqueue another pass; reads still form direct dependencies, and runaway loops fail explicitly.
Sourcepub fn structural(&self, callback: impl FnMut() + 'static) -> BindingId
pub fn structural(&self, callback: impl FnMut() + 'static) -> BindingId
Structural controllers update owned row state before prop bindings run. Use this for tree control flow; ordinary computed props remain pure.