summaryrefslogtreecommitdiffstats
path: root/examples/imagesearch.rs
diff options
context:
space:
mode:
authorsoftprops <d.tangren@gmail.com>2018-12-24 13:45:42 +0900
committersoftprops <d.tangren@gmail.com>2018-12-24 13:45:42 +0900
commitfcc4f7b9c648290887d90c5d8fe91b70e594870d (patch)
tree714f0a2406dea7372a5b3bfda8227fe03e20125e /examples/imagesearch.rs
parent7d5672fbe1089ef5b02375f7f3f77fe5257e4ec5 (diff)
maint details
Diffstat (limited to 'examples/imagesearch.rs')
-rw-r--r--examples/imagesearch.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/examples/imagesearch.rs b/examples/imagesearch.rs
new file mode 100644
index 0000000..a6d6e52
--- /dev/null
+++ b/examples/imagesearch.rs
@@ -0,0 +1,17 @@
+use shiplift::Docker;
+use tokio::prelude::Future;
+
+fn main() {
+ let docker = Docker::new();
+ println!("remote docker images in stock");
+ let fut = docker
+ .images()
+ .search("rust")
+ .map(|results| {
+ for result in results {
+ println!("{} - {}", result.name, result.description);
+ }
+ })
+ .map_err(|e| eprintln!("Error: {}", e));
+ tokio::run(fut);
+}