Skip to main content

exit_requested

Function exit_requested 

Source
pub fn exit_requested() -> bool
Expand description

Re-export framework services (HTTP, URI, etc.) from the dedicated services crate. Whether an exit request is outstanding, without consuming it.

For a backend whose way of closing can fail. Consuming the flag and then discovering the platform call did not land loses the app’s only record that it wanted to close: the app stays open, the gesture the user made did nothing, and nothing will ever ask again. Such a backend tests with this and calls take_exit_request once the request has actually been honoured.

This is also the cheap read for a loop that runs it every turn — see take_exit_request.