Skip to main content

bind_map

Macro bind_map 

Source
macro_rules! bind_map {
    ($obs:expr, $f:expr) => { ... };
}
Expand description

Create a mapped Binding from an observable with a transform function.

§Examples

let count = Observable::new(0);
let label = bind_map!(count, |c| format!("Count: {c}"));
assert_eq!(label.get(), "Count: 0");