Skip to main content

bind

Function bind 

Source
pub fn bind<V: PartialEq + 'static>(
    compute: impl Fn() -> V + 'static,
    apply: impl Fn(&V) + 'static,
)
Expand description

The binding primitive (§4.2): compute (tracked) + apply (untracked), equality-gated. Structural priority — bindings drain before plain effects. apply receives the new value by reference so V needs only PartialEq (no Clone).

Day API ↩ Guides· daybrite.dev