[−][src]Function gazpatcho::run_with_mpsc
pub fn run_with_mpsc(
title: &str,
conf: Config,
report_tx: Sender<Report>,
request_rx: Receiver<Request>
)
Launch the user interface, use mpsc to broadcast updates and accept additional requests.
Config defines available node templates. Learn about all the available configuration options in the config documentation.
Every time the graph model is changed through the UI, a new message will be
sent through report_tx
. Learn more about the format of the message in the
documentation of the report.
Any time a request for a change is received on request_rx
, the graph will
be updated. 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.
Unlike run_with_callback
, this function
allows for asynchronous updates initiated through the user code.
Example
See a full example in the crate documentation.