]> git.r.bdr.sh - rbdr/blog/blobdiff - src/command/sync_down.rs
Add logic skeleton for rust version
[rbdr/blog] / src / command / sync_down.rs
diff --git a/src/command/sync_down.rs b/src/command/sync_down.rs
new file mode 100644 (file)
index 0000000..a0c713b
--- /dev/null
@@ -0,0 +1,33 @@
+use std::io::Result;
+
+pub struct SyncDown;
+
+impl SyncDown {
+    pub fn new() -> Self {
+        SyncDown
+    }
+}
+
+impl super::Command for SyncDown {
+    fn before_dependencies(&self) -> Vec<Box<dyn super::Command>> {
+        vec![]
+    }
+
+    fn execute(&self, input: Option<&String>) -> Result<()> {
+        println!("Sync Down: {:?}!", input);
+        return Ok(())
+    }
+
+    fn after_dependencies(&self) -> Vec<Box<dyn super::Command>> {
+        vec![]
+    }
+
+    fn command(&self) -> &'static str {
+        "sync-down"
+    }
+
+    fn help(&self) -> &'static str {
+        "\t\t\tPulls from the git remote if configured"
+    }
+}
+