Skip to main content

Store

Trait Store 

Source
pub trait Store: 'static { }
Expand description

Marker trait for values published with NodeContext::provide_store.

The concrete Rust type is the lookup key. Each mounted owner can provide one value per type; a nearer provider of that type shadows an ancestor’s value. Prefer a named struct or newtype for each purpose. A type alias does not create a distinct key.

A store is ordinary Rust data and does not need #[pax]. Use Property handles inside it for reactive state; plain fields do not become reactive. The owner clears its providers at final unmount. Explicitly cloned handles can outlive that registration, but do not reconnect to a later mount.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§