Crate yaxpeax_arch[][src]

Modules

Structs

a struct describing the differece between some pair of A: Address. this is primarily useful in describing the size of an instruction, or the relative offset of a branch.

a struct for Reader impls that can operate on units of u8.

Enums

a minimal enum implementing DecodeError. this is intended to be enough for a low effort, low-fidelity error taxonomy, without boilerplate of a DecodeError implementation.

a slightly less minimal enum DecodeError. similar to StandardDecodeError, this is an anti-boilerplate measure. it additionally provides IncompleteDecoder, making it suitable to represent error kinds for decoders that are … not yet complete.

Traits

a collection of associated type parameters that constitute the definitions for an instruction set. Arch provides an Instruction and its associated Operands, which is guaranteed to be decodable by this Arch::Decoder. Arch::Decoder can always be constructed with a Default implementation, and decodes from a Reader<Arch::Address, Arch::Word>.

the minimum set of errors a yaxpeax-arch disassembler may produce.

this is not a particularly interesting trait. it just exists to add a std::error::Error bound onto DecodeError for std builds.

an interface to decode Arch::Instruction words from a reader of Arch::Words. errors are the architecture-defined DecodeError implemention.

instructions have lengths, and minimum possible sizes for advancing a decoder on error.

a trait defining how Item-sized words are read at Address-positioned offsets into some stream of data. for most uses, [yaxpeax_arch::U8Reader] probably is sufficient. when reading from data sources that aren’t &[u8], Address isn’t a multiple of u8, or Item isn’t a multiple of 8 bits, U8Reader won’t be sufficient.

a trait defining how to build a Reader<Address, Item> from some data source (Self). definitions of ReaderBuilder are provided for U8Reader on Address and Word types that yaxpeax_arch provides - external decoder implementations should also provide ReaderBuilder impls if they use custom Reader types.