diff options
author | iximeow <me@iximeow.net> | 2020-05-03 12:29:24 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2020-05-03 12:31:49 -0700 |
commit | f7449a21140c109567fa6c756dab2b1b0711a414 (patch) | |
tree | bebb35a38490d6bcfc9f73c8880b57146cf7a4a7 /src/lib.rs | |
parent | 12db880a312d8a4b755bd4139c502405c8011f23 (diff) |
add AddressDiff, CHANGELOG, and bump to 0.0.40.0.4
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -10,6 +10,8 @@ use core::hash::Hash; extern crate num_traits; #[cfg(feature="use-serde")] extern crate serde; +#[cfg(feature="use-serde")] +#[macro_use] extern crate serde_derive; #[cfg(feature="colors")] extern crate termion; @@ -17,7 +19,7 @@ extern crate termion; use serde::{Serialize, Deserialize}; mod address; -pub use address::{Address, AddressBase, AddressDisplay}; +pub use address::{Address, AddressBase, AddressDiff, AddressDiffAmount, AddressDisplay}; pub use address::{AddressDisplayUsize, AddressDisplayU64, AddressDisplayU32, AddressDisplayU16}; #[cfg(feature="address-parse")] pub use address::AddrParse; @@ -50,7 +52,7 @@ pub trait Decoder<Inst> where Inst: Sized + Default { #[cfg(feature="use-serde")] pub trait Arch { type Address: Address + Debug + Hash + PartialEq + Eq + Serialize + for<'de> Deserialize<'de>; - type Instruction: Instruction + LengthedInstruction<Unit=Self::Address> + Debug + Default; + type Instruction: Instruction + LengthedInstruction<Unit=AddressDiff<Self::Address>> + Debug + Default; type DecodeError: DecodeError + Debug + Display; type Decoder: Decoder<Self::Instruction, Error=Self::DecodeError> + Default; type Operand; @@ -59,7 +61,7 @@ pub trait Arch { #[cfg(not(feature="use-serde"))] pub trait Arch { type Address: Address + Debug + Hash + PartialEq + Eq; - type Instruction: Instruction + LengthedInstruction<Unit=Self::Address> + Debug + Default; + type Instruction: Instruction + LengthedInstruction<Unit=AddressDiff<Self::Address>> + Debug + Default; type DecodeError: DecodeError + Debug + Display; type Decoder: Decoder<Self::Instruction, Error=Self::DecodeError> + Default; type Operand; |