Skip to main content

State

Trait State 

Source
pub trait State<T> {
    // Required method
    fn value(&self) -> T;
}
Expand description

Something composition can read. Compose’s State.

Required Methods§

Source

fn value(&self) -> T

The value, recorded as read by the scope composing now.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T: Clone + 'static> State<T> for MutableState<T>

Source§

impl<T: Clone + PartialEq + 'static> State<T> for DerivedState<T>