da2b482bda
Move Storage Backend code imag::storage::backend -> imag::storage
2015-12-06 12:47:08 +01:00
ab3ada0914
Move header helpers from module/header/ to module/helpers/
2015-12-05 16:03:05 +01:00
c6a2d39981
Outsource header utilities into header helper
2015-12-05 16:01:30 +01:00
230d00f35a
Remove unused imports
2015-12-05 01:23:06 +01:00
f7a92b6e79
Resort "use"
...
First comes std stuff
Second is external crates
Then we have own modules
All in alphabetical order and as few lines as possible if readability is
preserved.
2015-12-05 01:14:13 +01:00
e515a70ec2
Rewrite Debug for Module
2015-12-02 12:24:05 +01:00
043e607765
Implement StorageBackendError::cause()
2015-12-02 12:24:05 +01:00
c3019528cf
ModuleError needs a cause as well
2015-12-02 12:24:05 +01:00
7531b5a6d7
Pass module to subcommand.
...
We need the module in the subcommand for building file paths and so on.
To be able to pass it, we must remove the ::new() function from the
trait, so we can make the parameter a trait object.
This is no object, as the module gets build non-generically from the
main(), so everything is fine with this.
2015-12-02 12:24:05 +01:00
0a026002b0
Pass CommandEnv struct to command exec function
...
So we can add parameters rather easily.
Also define CommandResult as result type.
2015-12-02 12:24:05 +01:00
9bf9f96ab1
Fix: ModuleError::mk() -> pub ModuleError::new()
2015-12-02 12:24:05 +01:00
18ea01b854
Pass StorageBackend to subcommand function
2015-12-02 12:24:05 +01:00
8af9ba48c0
We dont need the command traits anymore
2015-12-02 12:24:05 +01:00
84571bef0a
get_commands() can return a HashMap<str, fn()>, which is command name -> command function
2015-12-02 12:24:05 +01:00
a9a33321f7
Make command submodule public
2015-12-02 12:24:05 +01:00
cbd85b3d8e
Module should only provide functionality to get a list of commands it can execute
...
These commands can then be executed.
2015-12-02 12:24:05 +01:00
86286cce1b
Remove livetimes
2015-12-02 12:24:05 +01:00
750f4cd31c
Start adding the BM submodule
2015-12-02 12:24:05 +01:00
869cc5e5ab
Fix: unused import
2015-11-27 16:59:51 +01:00
56612cf1a0
Fix: unused import
2015-11-27 16:59:44 +01:00
99a2670803
Add module/command trait
2015-11-10 20:43:53 +01:00
ba91e7ee26
The module itself has to be populate the Command instance
...
This will be done by the module returning a lambda to build the
command instance.
2015-11-10 20:43:35 +01:00
f4dbec72ee
Add storage/backend setup
2015-11-10 20:43:30 +01:00
e73701ace4
Remove old todo module code
2015-11-10 20:33:47 +01:00
7f224e8f58
Replace all output with macros from logging library
2015-10-26 20:58:52 +01:00
9fb50dac68
Fix type for ModuleError::mk()
2015-10-25 19:54:54 +01:00
911384331b
Add ModuleError
2015-10-25 18:43:47 +01:00
c50d097831
Cleanup module confusion
2015-10-25 18:43:47 +01:00
034d71b21d
Rewrite
2015-10-25 18:43:46 +01:00
bff720018c
Module trait cleanups
2015-10-25 18:43:46 +01:00