pub trait AnnotatingDecoder<A: Arch + ?Sized> {
type FieldDescription: FieldDescription + Clone + Display + PartialEq;
// Required method
fn decode_with_annotation<T: Reader<A::Address, A::Word>, S: DescriptionSink<Self::FieldDescription>>(
&self,
inst: &mut A::Instruction,
words: &mut T,
sink: &mut S,
) -> Result<(), A::DecodeError>;
}Expand description
an interface to decode Arch::Instruction words from a reader of Arch::Words, with the
decoder able to report descriptions of bits or fields in the instruction to a sink implementing
DescriptionSink. the sink may be NullSink to discard provided data. decoding with a
NullSink should behave identically to Decoder::decode_into. implementors are recommended to
implement Decoder::decode_into as a call to AnnotatingDecoder::decode_with_annotation if
implementing both traits.
Required Associated Types§
type FieldDescription: FieldDescription + Clone + Display + PartialEq
Required Methods§
fn decode_with_annotation<T: Reader<A::Address, A::Word>, S: DescriptionSink<Self::FieldDescription>>( &self, inst: &mut A::Instruction, words: &mut T, sink: &mut S, ) -> Result<(), A::DecodeError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.