6d02e3d486
Module trait: Module must be able to lend a Runtime object
2016-01-02 20:06:20 +01:00
8a9f4c370e
Initial import of code for Notes module
2016-01-02 18:45:10 +01:00
a2856d8671
Remove unused imports
2015-12-30 23:02:05 +01:00
dc181ba8eb
Add doc to Module trait
2015-12-29 18:20:56 +01:00
00d0bbf4ae
Add basic interface for BM module
2015-12-27 18:00:28 +01:00
dd7b412976
Remove code
2015-12-21 19:20:09 +01:00
7d40b68407
Rename: StorageBackend -> Storage
2015-12-06 12:49:02 +01:00
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