This PR is somewhat complex, since significant plumbing needed to be done:
First, add the ReadZero trait, which is analogous to the Flash::read_direct() function.
Pipe ReadZero's lifetime parameter through HostPort.
Refactor FromWire to take ReadZero. This required doing some slightly nasty things to some tests; the tests are fine but the helpers are a bit silly. The handler.rs tests could use some love.
This required some substantial refactoring (most of which, thankfully, I did with a script). I can break this CL up into separate commits if desired.
This PR is somewhat complex, since significant plumbing needed to be done:
ReadZero
trait, which is analogous to theFlash::read_direct()
function.ReadZero
's lifetime parameter throughHostPort
.FromWire
to takeReadZero
. This required doing some slightly nasty things to some tests; the tests are fine but the helpers are a bit silly. Thehandler.rs
tests could use some love.This required some substantial refactoring (most of which, thankfully, I did with a script). I can break this CL up into separate commits if desired.