pub trait Observable<T> {
// Required methods
fn source_id(&self) -> SourceId;
fn source_name(&self) -> Arc<str> ⓘ;
fn get(&self) -> T;
fn subscribe(&self, observer: Observer) -> Subscription;
}Expand description
Readable value that can notify subscribers after meaningful changes.
SUI’s runtime consumes this trait, so applications may provide adapters for reducer stores, channels, actor snapshots, or other state architectures.
Required Methods§
fn source_id(&self) -> SourceId
fn source_name(&self) -> Arc<str> ⓘ
fn get(&self) -> T
fn subscribe(&self, observer: Observer) -> Subscription
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".