summaryrefslogtreecommitdiffstats
path: root/lib/core/libimagrt
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2018-04-24 22:02:16 +0200
committerMatthias Beyer <mail@beyermatthias.de>2018-04-24 22:16:40 +0200
commitba453323ba5049ab0e3d1814d0900c496ee97173 (patch)
tree0e2d3226da3e702b1f4a5f1372a1b7b9531aaecc /lib/core/libimagrt
parentbe74afd0317547785bb9e5320232d3f71bd067cb (diff)
Remove support for changing store backend
Diffstat (limited to 'lib/core/libimagrt')
-rw-r--r--lib/core/libimagrt/src/runtime.rs44
1 files changed, 0 insertions, 44 deletions
diff --git a/lib/core/libimagrt/src/runtime.rs b/lib/core/libimagrt/src/runtime.rs
index e3f8a01b..994bfa5b 100644
--- a/lib/core/libimagrt/src/runtime.rs
+++ b/lib/core/libimagrt/src/runtime.rs
@@ -368,50 +368,6 @@ impl<'a> Runtime<'a> {
&self.store
}
- /// Change the store backend to stdout
- ///
- /// For the documentation on purpose and cavecats, have a look at the documentation of the
- /// `Store::reset_backend()` function.
- ///
- pub fn store_backend_to_stdio(&mut self) -> Result<(), RuntimeError> {
- use libimagstore::file_abstraction::stdio::*;
- use libimagstore::file_abstraction::stdio::mapper::json::JsonMapper;
- use std::rc::Rc;
- use std::cell::RefCell;
-
- let mut input = ::std::io::stdin();
- let output = ::std::io::stdout();
- let output = Rc::new(RefCell::new(output));
- let mapper = JsonMapper::new();
-
- StdIoFileAbstraction::new(&mut input, output, mapper)
- .chain_err(|| RuntimeErrorKind::Instantiate)
- .and_then(|backend| {
- self.store
- .reset_backend(Box::new(backend))
- .chain_err(|| RuntimeErrorKind::Instantiate)
- })
- }
-
- pub fn store_backend_to_stdout(&mut self) -> Result<(), RuntimeError> {
- use libimagstore::file_abstraction::stdio::mapper::json::JsonMapper;
- use libimagstore::file_abstraction::stdio::out::StdoutFileAbstraction;
- use std::rc::Rc;
- use std::cell::RefCell;
-
- let output = ::std::io::stdout();
- let output = Rc::new(RefCell::new(output));
- let mapper = JsonMapper::new();
-
- StdoutFileAbstraction::new(output, mapper)
- .chain_err(|| RuntimeErrorKind::Instantiate)
- .and_then(|backend| {
- self.store
- .reset_backend(Box::new(backend))
- .chain_err(|| RuntimeErrorKind::Instantiate)
- })
- }
-
/// Get a editor command object which can be called to open the $EDITOR
pub fn editor(&self) -> Result<Option<Command>, RuntimeError> {
self.cli()