FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    new

    fn new() -> Self
    

    A new owner, owned by the current one (if any): disposed with it.

    Source

    new_root

    fn new_root() -> Self
    

    A new owner that no other owner disposes: the root of a tree.

    Source

    current

    fn current() -> Option<Self>
    

    The owner of what is made now, if any.

    Source

    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).

    Source

    dispose

    fn dispose(self: Self)
    

    Disposes the owner and everything it owns; cleanups run.

    Source

    is_alive

    fn is_alive(self: &Self) -> bool
    

    Whether the owner was not disposed.

    Source

    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.

    Source

    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.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.