The fixed buffer size can be problematic for some use cases, see:
- https://github.com/trussed-dev/ctaphid-dispatch/pull/15
To avoid adding support for different buffer sizes to the crate, we can
just make the dispatch implementation generic over the buffer size. For
simple cases, a type alias is provided using the old buffer size.
This patch flattens the public API of ctaphid-dispatch by making the
dispatch and types modules private and re-exporting the relevant types
from the root and removes unnecessary re-exports of the types defined by
ctaphid-app.
The buffer size is an implementation detail of the dispatch
implementation. Applications should not depend on it. This patch makes
the App trait generic over the response size and changes the request
argument to use a slice instead of a reference to a heapless::Vec.
If applications need a minimum response size, they can still use a
const assertion to enforce it.