From f7449a21140c109567fa6c756dab2b1b0711a414 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 3 May 2020 12:29:24 -0700 Subject: add AddressDiff, CHANGELOG, and bump to 0.0.4 --- src/lib.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 17115af..76de58c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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 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 + Debug + Default; + type Instruction: Instruction + LengthedInstruction> + Debug + Default; type DecodeError: DecodeError + Debug + Display; type Decoder: Decoder + 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 + Debug + Default; + type Instruction: Instruction + LengthedInstruction> + Debug + Default; type DecodeError: DecodeError + Debug + Display; type Decoder: Decoder + Default; type Operand; -- cgit v1.1