drying_paint
The name 'drying_paint' comes from the expression "watching paint dry". This module provides a system to "watch" some values for changes and run code whenever they change.
Example
use ;
use ;
// define a type to hold data
// define Watcher trait for the type
// instantiate the content
let content = new;
let weak = downgrade;
// create the Context
let mut ctx = new;
// dest was 0 when instantiated
assert_eq!;
// after adding the watcher, the callback has run (once)
ctx.add_watcher;
assert_eq!;
// we can change the "watched" value
*content.borrow_mut.source = 43;
assert_eq!;
// and it will be updated when we call
// update on the context
ctx.update;
assert_eq!;