Closed rzumer closed 5 years ago
Invalid instructions will be returning an Instruction
object with a distinct type
field, and hopefully the opcode to allow reassembly. So this leaves I/O errors that can for the most part simply be propagated.
Since the number of possible cases for returning None
has greatly decreased as mentioned in my last comment, I no longer believe that this is needed.
Instead of returning an
Option<Instruction>
fromInstruction::decode()
, aResult
would allow providing the user more details on where an error may have occurred (e.g. differentiating read errors from decoding errors).