[][src]Function gazpatcho::run_with_callback

pub fn run_with_callback<F>(title: &str, conf: Config, callback: F) where
    F: Fn(Report) -> Vec<Request> + 'static, 

Launch the user interface, use a callback to broadcast updates and accept additional requests.

Config defines available node templates. Learn about all the available configuration options in the config documentation.

The callback function will be executed every time there is a new change in the graph modeled by the application. Learn more about its format in the documentation of the report.

The callback function can optionally return a request to the graph to change its state. That can be used to revert unwanted user actions or to feed data into output node widgets. Learn more in the documentation of the request.

Limitation

This method allows users to send requests only as a reaction to an update. If you want to control when to send requests for updates, use run_with_mpsc.

Example

See a full example in the crate documentation.