Trait yaxpeax_arch::annotation::AnnotatingDecoder

source ·
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. implementers are recommended to implement Decoder::decode_into as a call to AnnotatingDecoder::decode_with_annotation if implementing both traits.

Required Associated Types§

Required Methods§

source

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>

Object Safety§

This trait is not object safe.

Implementors§