method DynHandle.changes
The values this field takes from now on (a new element whenever the value seen by this node changes).
Example:
dynamic Limits {
rps: u32 = 100
title: str = "shop"
}
fn firstChange() -> u32 io, time {
for await v in Limits.get().rps.changes() {
return v
}
0
}
fn main() io, time {
let l = Limits.get()
scope {
let h = spawn firstChange()
sleep(150ms)
l.rps.set(500)!
print("new value {h.join()!}")
}
}Output
new value 500
pub(api) fn changes() -> stream<T> where T: SerializableSince. 1.0.0-beta
Returns
stream<T> where T: Serializable
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/dynconf.oxl:494