aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/backend-stdio.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/backend-stdio.rs b/examples/backend-stdio.rs
new file mode 100644
index 0000000..6dbeb8d
--- /dev/null
+++ b/examples/backend-stdio.rs
@@ -0,0 +1,13 @@
+// Copyright (C) 2019 Robin Krahl <robin.krahl@ireas.org>
+// SPDX-License-Identifier: MIT
+
+use dialog::backends;
+use dialog::DialogBox;
+
+fn main() -> dialog::Result<()> {
+ let backend = backends::Stdio::new();
+
+ dialog::Message::new("This is a message.")
+ .title("And this is a title:")
+ .show_with(&backend)
+}