Owner
struct · ferroui-view · v0.5.0
struct Owner
What owns signals, memos and effects: they are disposed with it. A mounted element tree has one; each item of a dynamic list has its own.
Members
new
fn new() -> Self
A new owner, owned by the current one (if any): disposed with it.
new_root
fn new_root() -> Self
A new owner that no other owner disposes: the root of a tree.
current
fn current() -> Option<Self>
The owner of what is made now, if any.
with
fn with<R>(self: &Self, f: impl FnOnce() -> R) -> R
Runs f with this owner current (and no observer: f itself is not
reactive).
dispose
fn dispose(self: Self)
Disposes the owner and everything it owns; cleanups run.
is_alive
fn is_alive(self: &Self) -> bool
Whether the owner was not disposed.
provide_context
fn provide_context<T: Clone + 'static>(self: &Self, value: T)
Provides value to what this owner owns, at any depth: use_context
finds it from an owner below. A value of the same type provided again
replaces it.
context
fn context<T: Clone + 'static>(self: &Self) -> Option<T>
The value of type T provided to this owner or to the nearest owner
above it.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeIntoValue<T>IntoValue<Option<T>>FromValue<T>FromValue<Option<T>>IntoProp<T, Value>AnyValueEqBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedPropertyValueAnyValueClassDefaultsErasedDestructorIntoEitherTreeModelCloneCopyStructuralPartialEqPartialEqEqDebugDefault
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.