This patch adds a new derive crate that can be used to derive
implementations of the trussed::backend::Dispatch and
trussed::serde_extensions::ExtensionDispatch traits.
This patch adds API extensions to Trussed. To avoid having to add a
type parameter to Request and Reply, we serialize the requests and
replies. Extensions can be implemented by custom backends and are
executed by the dispatch implementation provided to the Service. An
additional type parameter is needed for ClientImplementation to express
the supported extensions. See tests/ext.rs for an example
implementation.
The serialization and deserialization of the requests and replies of
course adds additional overhead. An alternative would be to make
Request and Reply generic over the set of extensions.