diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2019-02-18 21:36:31 +0000 |
---|---|---|
committer | Robin Krahl <robin.krahl@ireas.org> | 2019-02-18 23:27:48 +0100 |
commit | 9df0f3bd565dfbf8c97d02969a17504c688bf381 (patch) | |
tree | da3a25d4900fc82a407ac729f5642f1e65cd0fbc /etc | |
parent | 49703cd770fd0522beae2dc53d1f882c9143c64e (diff) | |
download | ntw-9df0f3bd565dfbf8c97d02969a17504c688bf381.tar.gz ntw-9df0f3bd565dfbf8c97d02969a17504c688bf381.tar.bz2 |
Refactor command execution into commands module
This patch refactors the command execution. A command is represented by
a struct implementing the Command trait. The enum_cmd macro is used to
generate a mapping from the CommandId enum to a Command instance and to
execute the command. The request and response data is manually
converted from and to raw byte slices.
As we do not have a standard library, we cannot create a Box<Command>
from a CommandId. Instead, we directly delegate the execute method to
the corresponding Command.
Diffstat (limited to 'etc')
0 files changed, 0 insertions, 0 deletions