[−][src]Function dialog::default_backend
pub fn default_backend() -> Box<dyn Backend>
Creates a new instance of the default backend.
The following steps are performed to determine the default backend:
- If the
DIALOG
environment variable is set to a valid backend name, this backend is used. A valid backend name is the name of a struct in thebackends
module implementing theBackend
trait in any case. - If the
DISPLAY
environment variable is set, the first available backend from this list is used: - If the
Dialog
backend is available, it is used. - Otherwise, a
Stdio
instance is returned.